diff options
author | zotlabs <mike@macgirvin.com> | 2019-06-26 21:45:21 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-06-26 21:45:21 -0700 |
commit | cf844cb27c02c3aae636eb1aa1587b1d5e3e81a0 (patch) | |
tree | e49ba2b9c90fec0dccceac8b572a76ba2ab41038 /include/zot.php | |
parent | 4f280b5497325c7e7389096cb39f1f409de2638c (diff) | |
download | volse-hubzilla-cf844cb27c02c3aae636eb1aa1587b1d5e3e81a0.tar.gz volse-hubzilla-cf844cb27c02c3aae636eb1aa1587b1d5e3e81a0.tar.bz2 volse-hubzilla-cf844cb27c02c3aae636eb1aa1587b1d5e3e81a0.zip |
http signature consolidation
Diffstat (limited to 'include/zot.php')
-rw-r--r-- | include/zot.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/zot.php b/include/zot.php index a37b7cdb5..e9374f0cc 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; |