diff options
author | Mario Vavti <mario@mariovavti.com> | 2018-01-14 07:42:58 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2018-01-14 07:42:58 +0100 |
commit | 8970d30c936ac4ae600a6fd18c95b2cdffd1e20d (patch) | |
tree | f3222b200936a1c5a907f6e987bb45d26e9ecc95 /include/crypto.php | |
parent | ce10a44e722c9bbaceff64273641c3e08c6ad7a5 (diff) | |
parent | eb3e43feec4e2de439de5398fcf498c0de5afbd4 (diff) | |
download | volse-hubzilla-8970d30c936ac4ae600a6fd18c95b2cdffd1e20d.tar.gz volse-hubzilla-8970d30c936ac4ae600a6fd18c95b2cdffd1e20d.tar.bz2 volse-hubzilla-8970d30c936ac4ae600a6fd18c95b2cdffd1e20d.zip |
Merge remote-tracking branch 'mike/master' into dev
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 622add4dc..b990b18d9 100644 --- a/include/crypto.php +++ b/include/crypto.php @@ -22,13 +22,13 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') { $alg = OPENSSL_ALGO_SHA256; $verify = @openssl_verify($data,$sig,$key,$alg); - if(! $verify) { + if($verify === (-1)) { while($msg = openssl_error_string()) logger('openssl_verify: ' . $msg,LOGGER_NORMAL,LOG_ERR); btlogger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR); } - return $verify; + return (($verify > 0) ? true : false); } function pkcs5_pad ($text, $blocksize) |