Skip to content

Commit eae4c8b

Browse files
committed
Skip test if RSA or Keystore is disabled.
1 parent cd6b833 commit eae4c8b

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/rsa_session_persistence_test.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@
4343
#include <dlfcn.h>
4444
#endif
4545

46+
#if !defined(NO_RSA) && !defined(WOLFPKCS11_NO_STORE)
47+
4648
/* only include the RSA test data */
4749
#undef HAVE_ECC
4850
#define NO_AES
@@ -632,6 +634,8 @@ static CK_RV rsa_session_persistence_test(void)
632634
return ret;
633635
}
634636

637+
#endif /* !NO_RSA && !WOLFPKCS11_NO_STORE */
638+
635639
int main(int argc, char* argv[])
636640
{
637641
CK_RV ret;
@@ -643,13 +647,17 @@ int main(int argc, char* argv[])
643647
printf("wolfPKCS11 RSA Session Persistence Test\n");
644648
printf("========================================\n\n");
645649

650+
#if !defined(NO_RSA) && !defined(WOLFPKCS11_NO_STORE)
646651
ret = rsa_session_persistence_test();
647-
648652
if (ret == CKR_OK) {
649653
printf("\nAll tests passed!\n");
650654
return 0;
651655
} else {
652656
printf("\nTest failed with error: %lx\n", ret);
653657
return 1;
654658
}
659+
#else
660+
printf("RSA or KeyStore not compiled in!\n");
661+
return 77;
662+
#endif
655663
}

0 commit comments

Comments
 (0)