From: Mikael Nordfeldth Date: Sat, 25 Jun 2016 18:34:28 +0000 (+0200) Subject: Even more phpseclib update related stuff. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ad7ebd1a8c31e948e9693ef798c5a2294e38a60f;p=quix0rs-gnu-social.git Even more phpseclib update related stuff. --- diff --git a/plugins/OStatus/classes/Magicsig.php b/plugins/OStatus/classes/Magicsig.php index 639fe663b2..0a0fd2e067 100644 --- a/plugins/OStatus/classes/Magicsig.php +++ b/plugins/OStatus/classes/Magicsig.php @@ -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); } /**