aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Zfinger.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2019-06-27 13:05:25 +0200
committerMario <mario@mariovavti.com>2019-06-27 13:05:25 +0200
commit49ba3ffee6e53eefe11a03c62ee673398717b167 (patch)
treea0f0b45249487bd471bcf0545dfbb23f7b871623 /Zotlabs/Module/Zfinger.php
parent5ccef18d4e5b7901f78a11e0124c16e1c484e3bf (diff)
parentcf844cb27c02c3aae636eb1aa1587b1d5e3e81a0 (diff)
downloadvolse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.tar.gz
volse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.tar.bz2
volse-hubzilla-49ba3ffee6e53eefe11a03c62ee673398717b167.zip
Merge branch 'httpsig' into 'dev'
http signature consolidation See merge request hubzilla/core!1685
Diffstat (limited to 'Zotlabs/Module/Zfinger.php')
-rw-r--r--Zotlabs/Module/Zfinger.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/Zotlabs/Module/Zfinger.php b/Zotlabs/Module/Zfinger.php
index 6ed001df5..3a20144a5 100644
--- a/Zotlabs/Module/Zfinger.php
+++ b/Zotlabs/Module/Zfinger.php
@@ -1,6 +1,7 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Web\HTTPSig;
class Zfinger extends \Zotlabs\Web\Controller {
@@ -23,10 +24,9 @@ class Zfinger extends \Zotlabs\Web\Controller {
$ret = json_encode($x);
if($chan) {
- $hash = \Zotlabs\Web\HTTPSig::generate_digest($ret,false);
- $headers['Digest'] = 'SHA-256=' . $hash;
- \Zotlabs\Web\HTTPSig::create_sig('',$headers,$chan['channel_prvkey'],
- 'acct:' . $chan['channel_address'] . '@' . \App::get_hostname(),true);
+ $headers['Digest'] = HTTPSig::generate_digest_header($ret);
+ $h = HTTPSig::create_sig($headers,$chan['channel_prvkey'],'acct:' . channel_reddress($chan));
+ HTTPSig::set_headers($h);
}
else {
foreach($headers as $k => $v) {