From 3a8ce99a9d1635bc8f7182ef8b825777ab34255e Mon Sep 17 00:00:00 2001 From: Mikael Nordfeldth Date: Fri, 17 Jun 2016 23:47:00 +0200 Subject: [PATCH] Magicsig call for phpseclib\Math\BigInteger fixed --- plugins/OStatus/classes/Magicsig.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/plugins/OStatus/classes/Magicsig.php b/plugins/OStatus/classes/Magicsig.php index d7c7c38442..639fe663b2 100644 --- a/plugins/OStatus/classes/Magicsig.php +++ b/plugins/OStatus/classes/Magicsig.php @@ -27,11 +27,7 @@ * @link http://status.net/ */ -if (!defined('STATUSNET')) { - exit(1); -} - -require_once 'Crypt/RSA.php'; +if (!defined('GNUSOCIAL')) { exit(1); } class Magicsig extends Managed_DataObject { @@ -251,9 +247,9 @@ class Magicsig extends Managed_DataObject { $rsa = new \phpseclib\Crypt\RSA(); $rsa->setHash($this->getHash()); - $rsa->modulus = new Math_BigInteger(Magicsig::base64_url_decode($mod), 256); + $rsa->modulus = new \phpseclib\Math\BigInteger(Magicsig::base64_url_decode($mod), 256); $rsa->k = strlen($rsa->modulus->toBytes()); - $rsa->exponent = new Math_BigInteger(Magicsig::base64_url_decode($exp), 256); + $rsa->exponent = new \phpseclib\Math\BigInteger(Magicsig::base64_url_decode($exp), 256); if ($type == 'private') { $this->privateKey = $rsa; -- 2.39.5