diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2021-04-21 23:01:47 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2021-05-07 21:36:27 +0100 |
commit | 8f214355c6da8f28d7e742253bbe5ff56742d439 (patch) | |
tree | 18a4ee3985e8169206cd7faac3fad5c873f95c99 /src/shared/libfido2-util.c | |
parent | 896cc0da986f85980c4377d3f7073ce1f1cae778 (diff) | |
download | systemd-8f214355c6da8f28d7e742253bbe5ff56742d439.tar.gz |
FIDO2: if defined, check for FIDO_ERR_UV_BLOCKED
Newer libfido versions added this error, so check for it since it
can help the user with a more specific message
Diffstat (limited to 'src/shared/libfido2-util.c')
-rw-r--r-- | src/shared/libfido2-util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/libfido2-util.c b/src/shared/libfido2-util.c index ec69793f7c..24c9b76b7a 100644 --- a/src/shared/libfido2-util.c +++ b/src/shared/libfido2-util.c @@ -349,6 +349,11 @@ static int fido2_use_hmac_hash_specific_token( case FIDO_ERR_PIN_AUTH_BLOCKED: return log_error_errno(SYNTHETIC_ERRNO(EOWNERDEAD), "PIN of security token is blocked, please remove/reinsert token."); +#ifdef FIDO_ERR_UV_BLOCKED + case FIDO_ERR_UV_BLOCKED: + return log_error_errno(SYNTHETIC_ERRNO(EOWNERDEAD), + "Verification of security token is blocked, please remove/reinsert token."); +#endif case FIDO_ERR_PIN_INVALID: return log_error_errno(SYNTHETIC_ERRNO(ENOLCK), "PIN of security token incorrect."); @@ -633,6 +638,11 @@ int fido2_generate_hmac_hash( if (r == FIDO_ERR_PIN_AUTH_BLOCKED) return log_notice_errno(SYNTHETIC_ERRNO(EPERM), "Token PIN is currently blocked, please remove and reinsert token."); +#ifdef FIDO_ERR_UV_BLOCKED + if (r == FIDO_ERR_UV_BLOCKED) + return log_notice_errno(SYNTHETIC_ERRNO(EPERM), + "Token verification is currently blocked, please remove and reinsert token."); +#endif if (r == FIDO_ERR_ACTION_TIMEOUT) return log_error_errno(SYNTHETIC_ERRNO(ENOSTR), "Token action timeout. (User didn't interact with token quickly enough.)"); |