File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,22 @@ async function verifySig(req: any) {
15
15
if ( req . body . client . key . jwk . alg === 'RS256' ) {
16
16
algs . push ( 'rsa-v1_5-sha256' )
17
17
}
18
+ if ( req . body . client . key . jwk . alg === 'HS256' ) {
19
+ algs . push ( 'hmac-sha256' )
20
+ }
21
+ if ( req . body . client . key . jwk . alg === 'PS512' ) {
22
+ algs . push ( 'rsa-pss-sha512' )
23
+ }
24
+ if ( req . body . client . key . jwk . alg === 'ES256' ) {
25
+ algs . push ( 'ecdsa-p256-sha256-sha256' )
26
+ }
27
+ if ( req . body . client . key . jwk . alg === 'ES384' ) {
28
+ algs . push ( 'ecdsa-p384-sha384' )
29
+ }
18
30
keys . set ( req . body . client . key . kid , {
19
31
id : req . body . client . key . kid ,
20
32
algs,
21
- verify : createVerifier ( key_jose as Uint8Array , 'rsa-v1_5-sha256' ) ,
33
+ verify : createVerifier ( key_jose as Uint8Array , algs [ 0 ] ) ,
22
34
} ) ;
23
35
const verified = await httpbis . verifyMessage ( {
24
36
async keyLookup ( ) {
You can’t perform that action at this time.
0 commit comments