ensure signature block has algorithm

This commit is contained in:
Django Doucet 2023-04-21 09:36:17 -06:00
parent 1631f1c7dc
commit 7dbce74a96

View file

@ -184,11 +184,13 @@ class Signature {
}
public static function get_signature_algorithm( $signature_block ) {
switch ( $signature_block['algorithm'] ) {
case 'rsa-sha-512':
return 'sha512';
default:
return 'sha256';
if ( $signature_block['algorithm'] ) {
switch ( $signature_block['algorithm'] ) {
case 'rsa-sha-512':
return 'sha512'; //hs2019 https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12
default:
return 'sha256';
}
}
return false;
}