diff --git a/packages/vc-handler-ld-local/src/suites/impl/JsonWebSignatureWithRSASupport.ts b/packages/vc-handler-ld-local/src/suites/impl/JsonWebSignatureWithRSASupport.ts index 3def8abd7..1ffa50c1c 100644 --- a/packages/vc-handler-ld-local/src/suites/impl/JsonWebSignatureWithRSASupport.ts +++ b/packages/vc-handler-ld-local/src/suites/impl/JsonWebSignatureWithRSASupport.ts @@ -230,9 +230,9 @@ export class JsonWebSignature { } async verifySignature({ verifyData, verificationMethod, proof }: any) { - if (verificationMethod.publicKeyJwk) { - const key = verificationMethod.publicKeyJwk as CryptoKey - return await crypto.subtle.verify(key.algorithm?.name ? key.algorithm.name : 'SHA-256', key, new Uint8Array(proof.jws), verifyData) + if (verificationMethod.publicKey) { + const key = verificationMethod.publicKey as CryptoKey + return await subtle.verify(key.algorithm?.name ? key.algorithm.name : 'SHA-256', key, new Uint8Array(proof.jws), verifyData) } const verifier = await verificationMethod.verifier() return verifier.verify({ data: verifyData, signature: proof.jws })