summaryrefslogtreecommitdiff
path: root/plugins/OStatus/lib
diff options
context:
space:
mode:
authorJames Walker <walkah@walkah.net>2010-02-22 19:00:27 -0500
committerJames Walker <walkah@walkah.net>2010-02-22 19:01:12 -0500
commitcaad5859b51e8d9be87f234ebc91fdf2802816f1 (patch)
tree271ecf0e5477297dc7b73c3cd5fbeb9bd0e0201e /plugins/OStatus/lib
parent3b823f8fbde531b00f9770fb214543b965851036 (diff)
swapping pear error handling so Crypt_RSA can properly detect available
math libraries
Diffstat (limited to 'plugins/OStatus/lib')
-rw-r--r--plugins/OStatus/lib/magicsig.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/OStatus/lib/magicsig.php b/plugins/OStatus/lib/magicsig.php
index af65bad04..50eb301ab 100644
--- a/plugins/OStatus/lib/magicsig.php
+++ b/plugins/OStatus/lib/magicsig.php
@@ -57,8 +57,10 @@ class MagicsigRsaSha256
$keypair = new Crypt_RSA_KeyPair($key_length);
$params['public_key'] = $keypair->getPublicKey();
$params['private_key'] = $keypair->getPrivateKey();
-
+
+ PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
$this->keypair = new Crypt_RSA($params);
+ PEAR::popErrorHandling();
}
@@ -79,6 +81,8 @@ class MagicsigRsaSha256
public function fromString($text)
{
+ PEAR::pushErrorHandling(PEAR_ERROR_RETURN);
+
// remove whitespace
$text = preg_replace('/\s+/', '', $text);
@@ -86,7 +90,6 @@ class MagicsigRsaSha256
if (!preg_match('/RSA\.([^\.]+)\.([^\.]+)(.([^\.]+))?/', $text, $matches)) {
return false;
}
-
$mod = base64_url_decode($matches[1]);
$exp = base64_url_decode($matches[2]);
@@ -110,6 +113,7 @@ class MagicsigRsaSha256
}
$this->keypair = new Crypt_RSA($params);
+ PEAR::popErrorHandling();
}
public function getName()