1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

tkd: Check CKF_TOKEN_PRESENT, too.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-03-15 15:05:15 +09:00
parent 4a48149d84
commit fcae367ab5
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -1028,6 +1028,7 @@ token_init (ctrl_t ctrl, assuan_context_t ctx)
if (get_token_info (token, &tk_info) == 0) if (get_token_info (token, &tk_info) == 0)
{ {
if ((tk_info.flags & CKF_TOKEN_INITIALIZED) == 0 if ((tk_info.flags & CKF_TOKEN_INITIALIZED) == 0
|| (tk_info.flags & CKF_TOKEN_PRESENT) == 0
|| (tk_info.flags & CKF_USER_PIN_LOCKED) != 0) || (tk_info.flags & CKF_USER_PIN_LOCKED) != 0)
continue; continue;