Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fido2: Handle invalid PIN in credential management #531

Open
robin-nitrokey opened this issue Apr 16, 2024 · 0 comments
Open

fido2: Handle invalid PIN in credential management #531

robin-nitrokey opened this issue Apr 16, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@robin-nitrokey
Copy link
Member

The credential management commands should handle the PIN_INVALID error code and show an error message for it instead of just raising the exception.

if error.code == CtapError.ERR.PIN_NOT_SET:
local_critical("Please set a pin in order to manage credentials")
if error.code == CtapError.ERR.PIN_AUTH_BLOCKED:
local_critical(
"Pin authentication has been blocked, try reinserting the key or setting a pin if none is set"
)
if error.code == CtapError.ERR.PIN_BLOCKED:
local_critical(
"Your device has been blocked after too many failed unlock attempts, to fix this it "
"will have to be reset. (If no pin is set, plugging it in again might fix this warning)"
)

@robin-nitrokey robin-nitrokey added the enhancement New feature or request label Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant