aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-01-13 13:45:33 -0800
committerzotlabs <mike@macgirvin.com>2018-01-13 13:45:33 -0800
commit08bea83c032675e93c789070e681aab212c1d2a4 (patch)
treee85c89ad4bf1c7dffb7f133bdf30ebd3821947c4
parent8892568652c2fc56e39611660d9bec4770c4354b (diff)
downloadvolse-hubzilla-08bea83c032675e93c789070e681aab212c1d2a4.tar.gz
volse-hubzilla-08bea83c032675e93c789070e681aab212c1d2a4.tar.bz2
volse-hubzilla-08bea83c032675e93c789070e681aab212c1d2a4.zip
unexpected openssl result
-rw-r--r--Zotlabs/Module/Owa.php1
-rw-r--r--Zotlabs/Web/HTTPSig.php2
-rw-r--r--include/crypto.php2
3 files changed, 3 insertions, 2 deletions
diff --git a/Zotlabs/Module/Owa.php b/Zotlabs/Module/Owa.php
index 8764a33ee..537489687 100644
--- a/Zotlabs/Module/Owa.php
+++ b/Zotlabs/Module/Owa.php
@@ -38,6 +38,7 @@ class Owa extends \Zotlabs\Web\Controller {
foreach($r as $hubloc) {
$verified = \Zotlabs\Web\HTTPSig::verify('',$hubloc['xchan_pubkey']);
if($verified && $verified['header_signed'] && $verified['header_valid']) {
+ logger('OWA header: ' . print_r($verified,true));
logger('OWA success: ' . $hubloc['hubloc_addr'],LOGGER_DATA);
$ret['success'] = true;
$token = random_string(32);
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 9a8c23a9b..9a6c3cd39 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -117,7 +117,7 @@ class HTTPSig {
logger('verified: ' . $x, LOGGER_DEBUG);
- if($x === false)
+ if(! intval($x))
return $result;
if(! $spoofable)
diff --git a/include/crypto.php b/include/crypto.php
index 622add4dc..ab10edb03 100644
--- a/include/crypto.php
+++ b/include/crypto.php
@@ -28,7 +28,7 @@ function rsa_verify($data,$sig,$key,$alg = 'sha256') {
btlogger('openssl_verify: key: ' . $key, LOGGER_DEBUG, LOG_ERR);
}
- return $verify;
+ return (intval($verify) > 0 ? 1 : 0);
}
function pkcs5_pad ($text, $blocksize)