p11-glue / p11-kit

Provides a way to load and enumerate PKCS#11 modules.
https://p11-glue.github.io/p11-glue/p11-kit.html
Other
150 stars 92 forks source link

`p11-kit` commands expecting a single token/object prints confusing error upon no match #574

Closed ueno closed 11 months ago

ueno commented 11 months ago

If there are no matching objects, the p11-kit delete-object command shows the following error:

p11-kit delete-object "pkcs11:token=nonexistent"
p11-kit: failed to find the object: The operation was cancelled

This is confusing, because there is no user interaction involved, but CKR_CANCEL is only used as a convention to tell that there is no match: https://p11-glue.github.io/p11-glue/p11-kit/manual/p11-kit-Future.html#p11-kit-iter-next