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 /Zotlabs/Module/Magic.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 'Zotlabs/Module/Magic.php')
-rw-r--r-- | Zotlabs/Module/Magic.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php index e8e960574..6ac656a04 100644 --- a/Zotlabs/Module/Magic.php +++ b/Zotlabs/Module/Magic.php @@ -1,6 +1,8 @@ <?php namespace Zotlabs\Module; +use Zotlabs\Web\HTTPSig; + @require_once('include/zot.php'); @@ -152,10 +154,9 @@ class Magic extends \Zotlabs\Web\Controller { $headers['Accept'] = 'application/x-zot+json' ; $headers['X-Open-Web-Auth'] = random_string(); $headers['Host'] = $parsed['host']; - $headers['Digest'] = 'SHA-256=' . \Zotlabs\Web\HTTPSig::generate_digest($data,false); + $headers['Digest'] = HTTPSig::generate_digest_header($data); - $headers = \Zotlabs\Web\HTTPSig::create_sig('',$headers,$channel['channel_prvkey'], - 'acct:' . $channel['channel_address'] . '@' . \App::get_hostname(),false,true,'sha512'); + $headers = HTTPSig::create_sig($headers,$channel['channel_prvkey'], 'acct:' . channel_reddress($channel),true,'sha512'); $x = z_post_url($basepath . '/owa',$data,$redirects,[ 'headers' => $headers ]); if($x['success']) { |