aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-12-15 18:43:54 -0800
committerfriendica <info@friendica.com>2013-12-15 18:43:54 -0800
commit065300f7c352dc74e52a09804b7aeb858df1db0a (patch)
tree82182d391958a2931c98bd59f42cd1028c41b178 /include
parent817d1461236acf9067ab7ff79d116832f18c282b (diff)
downloadvolse-hubzilla-065300f7c352dc74e52a09804b7aeb858df1db0a.tar.gz
volse-hubzilla-065300f7c352dc74e52a09804b7aeb858df1db0a.tar.bz2
volse-hubzilla-065300f7c352dc74e52a09804b7aeb858df1db0a.zip
bloody hell - it isn't defined either.
Diffstat (limited to 'include')
-rw-r--r--include/crypto.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/crypto.php b/include/crypto.php
index 339d5fe17..33cdc10c0 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -4,7 +4,7 @@ function rsa_sign($data,$key,$alg = 'sha256') {
if(! $key)
return 'no key';
$sig = '';
- if(defined(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
+ if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
$alg = OPENSSL_ALGO_SHA256;
openssl_sign($data,$sig,$key,$alg);
return $sig;
@@ -15,7 +15,7 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
if(! $key)
return false;
- if(defined(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
+ if(intval(OPENSSL_ALGO_SHA256) && $alg === 'sha256')
$alg = OPENSSL_ALGO_SHA256;
$verify = openssl_verify($data,$sig,$key,$alg);
return $verify;