From ad7ebd1a8c31e948e9693ef798c5a2294e38a60f Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Sat, 25 Jun 2016 20:34:28 +0200 Subject: [PATCH] Even more phpseclib update related stuff. --- plugins/OStatus/classes/Magicsig.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } /** -- 2.39.5