Merge pull request #8841 from MrPetovan/task/8839-httpsignature-hs2019

Add support for "hs2019" algorithm value in Util\HTTPSignature
This commit is contained in:
Michael Vogel 2020-07-06 07:09:27 +02:00 committed by GitHub
commit 59c42a9237
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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';
}