]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Even more phpseclib update related stuff.
authorMikael Nordfeldth <mmn@hethane.se>
Sat, 25 Jun 2016 18:34:28 +0000 (20:34 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Sat, 25 Jun 2016 18:34:28 +0000 (20:34 +0200)
plugins/OStatus/classes/Magicsig.php

index 639fe663b2b8b5187e71025b0cfc2bc77d59f468..0a0fd2e067f94be8f29ccf587883a9871a7ce7ce 100644 (file)
@@ -157,10 +157,10 @@ class Magicsig extends Managed_DataObject
         $keypair = $rsa->createKey($bits);
 
         $magicsig->privateKey = new \phpseclib\Crypt\RSA();
-        $magicsig->privateKey->loadKey($keypair['privatekey']);
+        $magicsig->privateKey->load($keypair['privatekey']);
 
         $magicsig->publicKey = new \phpseclib\Crypt\RSA();
-        $magicsig->publicKey->loadKey($keypair['publickey']);
+        $magicsig->publicKey->load($keypair['publickey']);
 
         $magicsig->insert();        // will do $this->keypair = $this->toString(true);
         $magicsig->importKeys();    // seems it's necessary to re-read keys from text keypair
@@ -316,7 +316,7 @@ class Magicsig extends Managed_DataObject
     public function verify($signed_bytes, $signature)
     {
         $signature = self::base64_url_decode($signature);
-        return $this->publicKey->verify($signed_bytes, $signature);
+        return $this->publicKey->verify($signed_bytes, $signature, \phpseclib\Crypt\RSA::PADDING_PKCS1);
     }
 
     /**