Nitrokey / opcard-rs

OpenPGP card implementation
49 stars 1 forks source link

Error code for cryptographic operations with invalid key references #205

Closed ebourg closed 4 months ago

ebourg commented 4 months ago

Calling COMPUTE DIGITAL SIGNATURE or INTERNAL AUTHENTICATE when the referenced key doesn't exist returns an error code 6500 "No information given". Would it be possible to return a more precise error code, like 6A88 "Referenced data not found" for example?

sosthene-nitrokey commented 4 months ago

Thank you for the report.

This is not a path that normally happens since most tools will first check the state and detect that no key is present. A fix is on the way.

ebourg commented 4 months ago

Thank you. I tried to retrieve the key information first to check if it can be used, but it added 300 ms of latency.