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:
parent
a70954d2c2
commit
e437a38c98
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue