pkcs11: move around CKR_ARGUMENTS_BAD check
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@4749 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
294a8bca3d
commit
528b7ae7c7
|
@ -83,9 +83,6 @@ sc_pkcs11_get_mechanism_list(struct sc_pkcs11_card *p11card,
|
|||
unsigned int n, count = 0;
|
||||
int rv;
|
||||
|
||||
if (!pulCount)
|
||||
return CKR_ARGUMENTS_BAD;
|
||||
|
||||
for (n = 0; n < p11card->nmechanisms; n++) {
|
||||
if (!(mt = p11card->mechanisms[n]))
|
||||
continue;
|
||||
|
|
|
@ -501,6 +501,9 @@ CK_RV C_GetMechanismList(CK_SLOT_ID slotID,
|
|||
struct sc_pkcs11_slot *slot;
|
||||
CK_RV rv;
|
||||
|
||||
if (pulCount == NULL_PTR)
|
||||
return CKR_ARGUMENTS_BAD;
|
||||
|
||||
rv = sc_pkcs11_lock();
|
||||
if (rv != CKR_OK)
|
||||
return rv;
|
||||
|
|
Loading…
Reference in New Issue