diff options
author | Friendika <info@friendika.com> | 2011-08-20 20:54:03 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-20 20:54:03 -0700 |
commit | a3eb73ed11fb9940755b2a3e6d996232609c0e7f (patch) | |
tree | 162013b2325eaa7a5b4161edea72798212b2bf49 /include/crypto.php | |
parent | c0be5bea1698d5e2db140a295731fdce12ba0382 (diff) | |
download | volse-hubzilla-a3eb73ed11fb9940755b2a3e6d996232609c0e7f.tar.gz volse-hubzilla-a3eb73ed11fb9940755b2a3e6d996232609c0e7f.tar.bz2 volse-hubzilla-a3eb73ed11fb9940755b2a3e6d996232609c0e7f.zip |
diaspora sign/verify requires SHA0 hash algorithm
Diffstat (limited to 'include/crypto.php')
-rw-r--r-- | include/crypto.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/crypto.php b/include/crypto.php index a75a9aa74..a20606db5 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -9,7 +9,7 @@ function rsa_sign($data,$key,$alg = 'sha256') { $sig = ''; if (version_compare(PHP_VERSION, '5.3.0', '>=') || $alg === 'sha1') { - openssl_sign($data,$sig,$key,(($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : 'sha256')); + openssl_sign($data,$sig,$key,(($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg)); } else { if(strlen($key) < 1024 || extension_loaded('gmp')) { @@ -31,7 +31,7 @@ function rsa_sign($data,$key,$alg = 'sha256') { function rsa_verify($data,$sig,$key,$alg = 'sha256') { if (version_compare(PHP_VERSION, '5.3.0', '>=') || $alg === 'sha1') { - $verify = openssl_verify($data,$sig,$key,(($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : 'sha256')); + $verify = openssl_verify($data,$sig,$key,(($alg == 'sha1') ? OPENSSL_ALGO_SHA1 : $alg)); } else { if(strlen($key) <= 300 || extension_loaded('gmp')) { |