pkcs11: fix translation of SC error to PKCS11
SC error SC_ERROR_WRONG_CARD and SC_ERROR_NO_CARD_SUPPORT are translated as CKR_TOKEN_NOT_RECOGNIZED
This commit is contained in:
parent
9fdd9ecaeb
commit
f43a9fa41c
|
@ -75,6 +75,8 @@ static CK_RV sc_to_cryptoki_error_common(int rc)
|
|||
case SC_ERROR_CARD_NOT_PRESENT:
|
||||
return CKR_TOKEN_NOT_PRESENT;
|
||||
case SC_ERROR_INVALID_CARD:
|
||||
case SC_ERROR_WRONG_CARD:
|
||||
case SC_ERROR_NO_CARD_SUPPORT:
|
||||
return CKR_TOKEN_NOT_RECOGNIZED;
|
||||
case SC_ERROR_WRONG_LENGTH:
|
||||
return CKR_DATA_LEN_RANGE;
|
||||
|
|
Loading…
Reference in New Issue