]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
FIDO2: if defined, check for FIDO_ERR_UV_BLOCKED 19298/head
authorLuca Boccassi <luca.boccassi@microsoft.com>
Wed, 21 Apr 2021 22:01:47 +0000 (23:01 +0100)
committerLuca Boccassi <bluca@debian.org>
Fri, 7 May 2021 20:36:27 +0000 (21:36 +0100)
Newer libfido versions added this error, so check for it since it
can help the user with a more specific message

src/shared/libfido2-util.c

index ec69793f7cfe889df4b3aa24cce19f8bb339cdd3..24c9b76b7ad611711f824b1b53007f9f13643001 100644 (file)
@@ -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.)");