aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2022-05-19 07:36:57 +0000
committerMario <mario@mariovavti.com>2022-05-19 07:36:57 +0000
commit940a0c8b10bcd25b5968820bbb02b0c900f33ebb (patch)
tree981719478b110033a0356fd70cd7bdae6f25a392
parent8928b24e2329df74801fbd61666693ae7719fb86 (diff)
downloadvolse-hubzilla-940a0c8b10bcd25b5968820bbb02b0c900f33ebb.tar.gz
volse-hubzilla-940a0c8b10bcd25b5968820bbb02b0c900f33ebb.tar.bz2
volse-hubzilla-940a0c8b10bcd25b5968820bbb02b0c900f33ebb.zip
add a hidden config for the hs2019 http sig algo
-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'] . '"';