- fixed two minor issues in p11 test code

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@879 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
okir 2003-01-21 15:29:17 +00:00
parent 733f6d1fb9
commit b9c3ec2ec4
1 changed files with 2 additions and 6 deletions

View File

@ -901,7 +901,7 @@ test_digest(CK_SLOT_ID slot)
ck_mech.mechanism = mechTypes[i];
rv = p11->C_DigestInit(session, &ck_mech);
if (rv == CKR_FUNCTION_NOT_SUPPORTED)
if (rv == CKR_MECHANISM_INVALID)
continue; /* mechanism not implemented, don't test */
if (rv != CKR_OK)
p11_fatal("C_DigestInit", rv);
@ -1163,11 +1163,7 @@ test_signature(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
datas[0] = data;
dataLens[0] = dataLen;
i = 0xffffff;
while (1) {
if (mechTypes[++i] == 0xffffff)
break;
for (i = 0; mechTypes[i] != 0xffffff; i++) {
ck_mech.mechanism = mechTypes[i];
rv = p11->C_SignInit(session, &ck_mech, privKeyObject);