add more signature logging

This commit is contained in:
zotlabs
2017-09-20 21:20:00 -07:00
parent c4261b9c4b
commit 24a9c3ba79
2 changed files with 11 additions and 2 deletions

View File

@@ -48,7 +48,7 @@ class HTTPSig {
else {
$headers = [];
$headers['(request-target)'] =
$_SERVER['REQUEST_METHOD'] . ' ' .
strtolower($_SERVER['REQUEST_METHOD']) . ' ' .
$_SERVER['REQUEST_URI'];
foreach($_SERVER as $k => $v) {
if(strpos($k,'HTTP_') === 0) {
@@ -70,6 +70,8 @@ class HTTPSig {
if(! $sig_block)
return $result;
logger('sig_block: ' . print_r($sig_block,true), LOGGER_DATA);
$result['header_signed'] = true;
$signed_headers = $sig_block['headers'];
@@ -110,6 +112,8 @@ class HTTPSig {
$x = rsa_verify($signed_data,$sig_block['signature'],$key,$algorithm);
logger('verified: ' . $x, LOGGER_DEBUG);
if($x === false)
return $result;
@@ -130,6 +134,8 @@ class HTTPSig {
}
}
logger('Content_Valid: ' . $result['content_valid']);
return $result;
}