aboutsummaryrefslogtreecommitdiffstats
path: root/include/zot.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 /include/zot.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 'include/zot.php')
-rw-r--r--include/zot.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php
index 5fd900765..53c3d4d86 100644
--- a/include/zot.php
+++ b/include/zot.php
@@ -303,9 +303,8 @@ function zot_zot($url, $data, $channel = null,$crypto = null) {
if($channel) {
$headers['X-Zot-Token'] = random_string();
- $hash = \Zotlabs\Web\HTTPSig::generate_digest($data,false);
- $headers['X-Zot-Digest'] = 'SHA-256=' . $hash;
- $h = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'],'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,false,'sha512',(($crypto) ? $crypto['hubloc_sitekey'] : ''), (($crypto) ? zot_best_algorithm($crypto['site_crypto']) : ''));
+ $headers['X-Zot-Digest'] = \Zotlabs\Web\HTTPSig::generate_digest_header($data);
+ $h = \Zotlabs\Web\HTTPSig::create_sig($headers,$channel['channel_prvkey'],'acct:' . channel_reddress($channel),false,'sha512',(($crypto) ? $crypto['hubloc_sitekey'] : ''), (($crypto) ? zot_best_algorithm($crypto['site_crypto']) : ''));
}
$redirects = 0;