PeculiarVentures / fortify-examples

Fortify enables web applications to use smart cards, local certificate stores and do certificate enrollment. This is a set of examples of how to use Fortify in your own applications.
MIT License
8 stars 5 forks source link

Example5 - Signature verification attempts CKR_MECHANISM_INVALID return for Estonian ID Card #14

Open omitobi opened 11 months ago

omitobi commented 11 months ago

I used example 5 as it is here: https://github.com/PeculiarVentures/fortify-examples/blob/gh-pages/example5.html

The problem is at the line where it signs the piece of text it throws this error: CKR_MECHANISM_INVALID

Please advice on how to solve the issue.

The algorithm I used is

const alg = {
   name: 'ECDSA',
   hash: 'SHA-256',
}

The key pair is read from Estonian Smart Card.