miekg / pkcs11

pkcs11 wrapper for Go
BSD 3-Clause "New" or "Revised" License
375 stars 133 forks source link

Predefined errors #135

Closed langbeck closed 2 years ago

langbeck commented 4 years ago

There's a need to be able to check which error was responsible for a failure. One such case is p11.Session.FindObject which does return an error but there's no way to take an action when there's no matching object or other action when there's too many matching objects.

The following PR would solve this problem: https://github.com/miekg/pkcs11/pull/124