aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Web
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
committerMario <mario@mariovavti.com>2022-06-01 07:00:21 +0000
commite63f0438415bb364f3085286ca2f199e83ab187b (patch)
treeb107429276ebfc92dc9b4f78e302a4967e5bf0a6 /Zotlabs/Web
parentc5f33baf27d80e2a7ad7307eacd3137609eeb089 (diff)
parent33dd0c83e377b8adf00559337d13784ec136cecb (diff)
downloadvolse-hubzilla-7.4.tar.gz
volse-hubzilla-7.4.tar.bz2
volse-hubzilla-7.4.zip
Merge branch '7.4RC'7.4
Diffstat (limited to 'Zotlabs/Web')
-rw-r--r--Zotlabs/Web/HTTPSig.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Web/HTTPSig.php b/Zotlabs/Web/HTTPSig.php
index 4177477a1..cb41c2b7d 100644
--- a/Zotlabs/Web/HTTPSig.php
+++ b/Zotlabs/Web/HTTPSig.php
@@ -502,8 +502,11 @@ class HTTPSig {
$x = self::sign($head, $prvkey, $alg);
- // TODO: should we default to hs2019?
- // $headerval = 'keyId="' . $keyid . '",algorithm="' . (($algorithm === 'rsa-sha256') ? 'hs2019' : $algorithm) . '",headers="' . $x['headers'] . '",signature="' . $x['signature'] . '"';
+ // TODO: should we default to hs2019? cavage-http-signatures-12 is not very wide spread yet
+
+ if (get_config('system', 'use_hs2019', false) && $algorithm === 'rsa-sha256') {
+ $algorithm = 'hs2019';
+ }
$headerval = 'keyId="' . $keyid . '",algorithm="' . $algorithm . '",headers="' . $x['headers'] . '",signature="' . $x['signature'] . '"';