slot_get_token(): return CKR_TOKEN_NOT_PRESENT if CKF_TOKEN_PRESENT is
not set. Thanks to Douglas E. Engert for the patch http://www.opensc-project.org/pipermail/opensc-devel/2008-October/011361.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3583 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
001f03f18d
commit
6b89748111
|
@ -272,6 +272,12 @@ CK_RV slot_get_token(int id, struct sc_pkcs11_slot **slot)
|
|||
if (rv != CKR_OK)
|
||||
return CKR_TOKEN_NOT_PRESENT;
|
||||
}
|
||||
|
||||
if (!((*slot)->slot_info.flags & CKF_TOKEN_PRESENT))
|
||||
{
|
||||
sc_debug(context, "card detected, but slot not presenting token");
|
||||
return CKR_TOKEN_NOT_PRESENT;
|
||||
}
|
||||
return CKR_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue