Skip to content

Commit

Permalink
fix: Alg header was not correctly set, and we do support ES256 for Js…
Browse files Browse the repository at this point in the history
…onWebSignature2020 now
  • Loading branch information
nklomp committed Aug 9, 2023
1 parent f2f9fbc commit d8e961c
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ export class SphereonJsonWebSignature2020 extends SphereonLdSignature {
alg = 'EdDSA'
} else if (key.type === 'Secp256k1') {
alg = 'ES256k'
throw Error('ES256k keys not supported yet (to JWK missing)')
} else if (key.type === 'Secp256r1') {
alg = 'ES256'
} else if (key.type === 'Bls12381G1') {
Expand All @@ -48,7 +47,7 @@ export class SphereonJsonWebSignature2020 extends SphereonLdSignature {
// returns a JWS detached
sign: async (args: { data: Uint8Array }): Promise<string> => {
const header = {
alg: 'EdDSA',
alg,
b64: false,
crit: ['b64'],
}
Expand Down

0 comments on commit d8e961c

Please sign in to comment.