Skip to content

Commit 88e7d47

Browse files
Merge pull request #7230 from anhu/tests_gating
Fixup some gating in the tests.
2 parents fd2b80e + 00c3f5b commit 88e7d47

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

wolfcrypt/test/test.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15755,7 +15755,8 @@ WOLFSSL_TEST_SUBROUTINE wc_test_ret_t memory_test(void)
1575515755
#ifdef WOLFSSL_CERT_GEN
1575615756
static const char* rsaCaCertFile = CERT_ROOT "ca-cert.pem";
1575715757
#endif
15758-
#if defined(WOLFSSL_ALT_NAMES) || defined(HAVE_PKCS7)
15758+
#if (defined(WOLFSSL_ALT_NAMES) || defined(HAVE_PKCS7)) \
15759+
&& !defined(NO_ASN_TIME)
1575915760
static const char* rsaCaCertDerFile = CERT_ROOT "ca-cert.der";
1576015761
#endif
1576115762
#ifdef HAVE_PKCS7
@@ -18109,8 +18110,7 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
1810918110
if (ret < 0) {
1811018111
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit_rsa);
1811118112
}
18112-
18113-
#ifdef WOLFSSL_ALT_NAMES
18113+
#if defined(WOLFSSL_ALT_NAMES) || defined(HAVE_PKCS7)
1811418114
/* Get CA Cert for testing */
1811518115
#ifdef USE_CERT_BUFFERS_1024
1811618116
XMEMCPY(tmp, ca_cert_der_1024, sizeof_ca_cert_der_1024);
@@ -18129,6 +18129,7 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
1812918129
ERROR_OUT(WC_TEST_RET_ENC_ERRNO, exit_rsa);
1813018130
#endif /* USE_CERT_BUFFERS */
1813118131

18132+
#if defined(WOLFSSL_ALT_NAMES)
1813218133
#if !defined(NO_FILESYSTEM) && !defined(USE_CERT_BUFFERS_1024) && \
1813318134
!defined(USE_CERT_BUFFERS_2048) && !defined(NO_ASN)
1813418135
ret = wc_SetAltNames(myCert, rsaCaCertFile);
@@ -18150,7 +18151,8 @@ static wc_test_ret_t rsa_certgen_test(RsaKey* key, RsaKey* keypub, WC_RNG* rng,
1815018151
if (ret < 0)
1815118152
ERROR_OUT(WC_TEST_RET_ENC_EC(ret), exit_rsa);
1815218153
#endif
18153-
#endif /* WOLFSSL_ALT_NAMES */
18154+
#endif /* WOLFSSL_ALT_NAMES */
18155+
#endif /* WOLFSSL_ALT_NAMES || HAVE_PKCS7 */
1815418156

1815518157
/* Get CA Key */
1815618158
#ifdef USE_CERT_BUFFERS_1024

0 commit comments

Comments
 (0)