p11test: Do not report and try pairs without private key
This commit is contained in:
parent
969e29e663
commit
28deeb2a00
|
@ -36,6 +36,11 @@ void multipart_tests(void **state) {
|
|||
|
||||
debug_print("\nCheck functionality of Multipart Sign&Verify");
|
||||
for (i = 0; i < objects.count; i++) {
|
||||
if (objects.data[i].private_handle == CK_INVALID_HANDLE) {
|
||||
debug_print(" [ SKIP %s ] Skip missing private key",
|
||||
objects.data[i].id_str);
|
||||
continue;
|
||||
}
|
||||
if (objects.data[i].type == EVP_PK_EC) {
|
||||
debug_print(" [ SKIP %s ] EC keys do not support multi-part operations",
|
||||
objects.data[i].id_str);
|
||||
|
@ -79,6 +84,9 @@ void multipart_tests(void **state) {
|
|||
objects.data[i].sign ? "[./] " : "[ ] ",
|
||||
objects.data[i].verify ? " [./] " : " [ ] ",
|
||||
objects.data[i].label);
|
||||
if (objects.data[i].private_handle == CK_INVALID_HANDLE) {
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < objects.data[i].num_mechs; j++) {
|
||||
test_mech_t *mech = &objects.data[i].mechs[j];
|
||||
if ((mech->usage_flags & CKF_SIGN) == 0) {
|
||||
|
|
|
@ -669,6 +669,9 @@ void readonly_tests(void **state) {
|
|||
printf(" no usable attributes found ... ignored\n");
|
||||
continue;
|
||||
}
|
||||
if (objects.data[i].private_handle == CK_INVALID_HANDLE) {
|
||||
continue;
|
||||
}
|
||||
for (j = 0; j < o->num_mechs; j++) {
|
||||
test_mech_t *mech = &o->mechs[j];
|
||||
if ((mech->usage_flags & CKF_SIGN) == 0) {
|
||||
|
|
Loading…
Reference in New Issue