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:
martin 2010-09-21 16:11:40 +00:00
parent 294a8bca3d
commit 528b7ae7c7
2 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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;