summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Auth/OpenID/BigMath.php1
-rw-r--r--Auth/OpenID/Consumer.php2
-rw-r--r--Auth/OpenID/HMAC.php7
-rw-r--r--Auth/Yadis/Manager.php2
4 files changed, 9 insertions, 3 deletions
diff --git a/Auth/OpenID/BigMath.php b/Auth/OpenID/BigMath.php
index 7fca2dc..58b46bf 100644
--- a/Auth/OpenID/BigMath.php
+++ b/Auth/OpenID/BigMath.php
@@ -365,7 +365,6 @@ function Auth_OpenID_detectMathLibrary($exts)
{
$loaded = false;
- $hasDl = function_exists('dl');
foreach ($exts as $extension) {
if (extension_loaded($extension['extension'])) {
return $extension;
diff --git a/Auth/OpenID/Consumer.php b/Auth/OpenID/Consumer.php
index e498a24..bffed4d 100644
--- a/Auth/OpenID/Consumer.php
+++ b/Auth/OpenID/Consumer.php
@@ -1185,7 +1185,7 @@ class Auth_OpenID_GenericConsumer {
// oidutil.log('Performing discovery on %s' % (claimed_id,))
list($unused, $services) = call_user_func($this->discoverMethod,
$claimed_id,
- $this->fetcher);
+ &$this->fetcher);
if (!$services) {
return new Auth_OpenID_FailureResponse(null,
diff --git a/Auth/OpenID/HMAC.php b/Auth/OpenID/HMAC.php
index e9779bd..e6c4bdf 100644
--- a/Auth/OpenID/HMAC.php
+++ b/Auth/OpenID/HMAC.php
@@ -60,6 +60,13 @@ function Auth_OpenID_HMACSHA1($key, $text)
$key = Auth_OpenID_SHA1($key, true);
}
+ if (function_exists('hash_hmac') &&
+ function_exists('hash_algos') &&
+ (in_array('sha1', hash_algos()))) {
+ return hash_hmac('sha1', $text, $key, true);
+ }
+ // Home-made solution
+
$key = str_pad($key, Auth_OpenID_SHA1_BLOCKSIZE, chr(0x00));
$ipad = str_repeat(chr(0x36), Auth_OpenID_SHA1_BLOCKSIZE);
$opad = str_repeat(chr(0x5c), Auth_OpenID_SHA1_BLOCKSIZE);
diff --git a/Auth/Yadis/Manager.php b/Auth/Yadis/Manager.php
index 5829de6..ee6f68b 100644
--- a/Auth/Yadis/Manager.php
+++ b/Auth/Yadis/Manager.php
@@ -413,7 +413,7 @@ class Auth_Yadis_Discovery {
list($yadis_url, $services) = call_user_func($discover_cb,
$this->url,
- $fetcher);
+ &$fetcher);
$manager = $this->createManager($services, $yadis_url);
}