From 8b3878dc7daee0bcf523e75fe204a1db42bcfeff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Sur=C3=BD?= Date: Mon, 27 Aug 2018 11:24:32 +0200 Subject: [PATCH] Run rsabigexponent test only when OpenSSL is used as cryptography provider --- bin/tests/system/rsabigexponent/bigkey.c | 5 +++++ bin/tests/system/rsabigexponent/prereq.sh | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/rsabigexponent/bigkey.c b/bin/tests/system/rsabigexponent/bigkey.c index e0a82abe45..f3358e0d54 100644 --- a/bin/tests/system/rsabigexponent/bigkey.c +++ b/bin/tests/system/rsabigexponent/bigkey.c @@ -75,6 +75,8 @@ main(int argc, char **argv) { UNUSED(argc); UNUSED(argv); +#if !USE_PKCS11 + rsa = RSA_new(); e = BN_new(); pkey = EVP_PKEY_new(); @@ -149,6 +151,9 @@ main(int argc, char **argv) { dns_name_destroy(); isc_mem_destroy(&mctx); return (0); +#else /* !USE_PKCS11 */ + return (1); +#endif /* !USE_PKC11 */ } /*! \file */ diff --git a/bin/tests/system/rsabigexponent/prereq.sh b/bin/tests/system/rsabigexponent/prereq.sh index aaca684d62..2ee132d669 100644 --- a/bin/tests/system/rsabigexponent/prereq.sh +++ b/bin/tests/system/rsabigexponent/prereq.sh @@ -16,7 +16,7 @@ if $BIGKEY > /dev/null 2>&1 then rm -f Kexample.* else - echo_i "This test requires cryptography" >&2 - echo_i "configure with --with-openssl, or --with-pkcs11 and --enable-native-pkcs11" >&2 + echo_i "This test requires OpenSSL cryptography provider" >&2 + echo_i "configure with --with-openssl, and make sure you disable --with-pkcs11 and --enable-native-pkcs11" >&2 exit 255 fi