pkcs11: Return CKR_TOKEN_NOT_RECOGNIZED for not recognized cards
Fixes #2030
This commit is contained in:
parent
e8a2644435
commit
16456922e2
|
@ -557,7 +557,11 @@ CK_RV C_GetTokenInfo(CK_SLOT_ID slotID, CK_TOKEN_INFO_PTR pInfo)
|
|||
}
|
||||
|
||||
if (slot->p11card == NULL) {
|
||||
rv = CKR_TOKEN_NOT_PRESENT;
|
||||
if (slot->slot_info.flags & CKF_TOKEN_PRESENT) {
|
||||
rv = CKR_TOKEN_NOT_RECOGNIZED;
|
||||
} else {
|
||||
rv = CKR_TOKEN_NOT_PRESENT;
|
||||
}
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue