PeculiarVentures/webcrypto-local

RSA-OAEP key signing error

bunyaminatik opened this issue · 2 comments

Hi,

I have a smart card that has rsa key pairs and Qualified certificate. But rsa key type is RSA-OAEP. When I try to sign with this key, it returns 'key does not match that of operation'. Because key usages returns empty. But I can use this key in bouncy castle on java for signing.

How could we solve that. Please help me.

image

Key information also here from javascript console.

image

@bunyaminatik Please try to get the private key from the storage with a signing mechanism

const alg = {
  name: "RSASSA-PKCS1-v1_5",
  hash: "SHA-256",
};
const privateKey = await provider.keyStorage.getItem("<private key id>", alg, false, ["sign"]);