Dont give errors with -t option if the private key doesnt support key unwrap

git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1082 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
sth 2003-04-30 12:24:40 +00:00
parent a70954d2c2
commit e437a38c98
1 changed files with 5 additions and 1 deletions

View File

@ -1493,7 +1493,7 @@ wrap_unwrap(CK_SLOT_ID slot, CK_SESSION_HANDLE session,
if (rv == CKR_MECHANISM_INVALID)
return 0;
if (rv != CKR_OK) {
p11_perror("C_UnwrapKey failed", rv);
p11_perror("C_UnwrapKey", rv);
return 1;
}
@ -1571,6 +1571,10 @@ test_unwrap(CK_SLOT_ID slot, CK_SESSION_HANDLE session)
printf("(%s) ", label);
free(label);
}
if (!getUNWRAP(sess, privKeyObject)) {
printf(" -- can't be used to unwrap, skipping\n");
continue;
}
printf("\n");
#ifndef HAVE_OPENSSL