ensure signature block has algorithm
This commit is contained in:
parent
1631f1c7dc
commit
7dbce74a96
1 changed files with 7 additions and 5 deletions
|
@ -184,11 +184,13 @@ class Signature {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function get_signature_algorithm( $signature_block ) {
|
public static function get_signature_algorithm( $signature_block ) {
|
||||||
switch ( $signature_block['algorithm'] ) {
|
if ( $signature_block['algorithm'] ) {
|
||||||
case 'rsa-sha-512':
|
switch ( $signature_block['algorithm'] ) {
|
||||||
return 'sha512';
|
case 'rsa-sha-512':
|
||||||
default:
|
return 'sha512'; //hs2019 https://datatracker.ietf.org/doc/html/draft-cavage-http-signatures-12
|
||||||
return 'sha256';
|
default:
|
||||||
|
return 'sha256';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue