1
0
Fork 0

Add support for "hs2019" algorithm value in Util\HTTPSignature

This commit is contained in:
Hypolite Petovan 2020-07-04 13:12:59 -04:00
parent ecb9eecdc8
commit 78b424c7fd

View file

@ -534,6 +534,14 @@ class HTTPSignature
$algorithm = null;
// Wildcard value where signing algorithm should be derived from keyId
// @see https://tools.ietf.org/html/draft-ietf-httpbis-message-signatures-00#section-4.1
// Defaulting to SHA256 as it seems to be the prevalent implementation
// @see https://arewehs2019yet.vpzom.click
if ($sig_block['algorithm'] === 'hs2019') {
$algorithm = 'sha256';
}
if ($sig_block['algorithm'] === 'rsa-sha256') {
$algorithm = 'sha256';
}