From df1c73c8e56862b8d3471822b2331ce664030975 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 28 Feb 2018 13:27:10 -0700 Subject: [PATCH] check for case that BER to DER API is available --- wolfcrypt/test/test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/wolfcrypt/test/test.c b/wolfcrypt/test/test.c index 32fe4139d..b27e0b51d 100644 --- a/wolfcrypt/test/test.c +++ b/wolfcrypt/test/test.c @@ -910,7 +910,9 @@ initDefaultName(); printf( "mp test passed!\n"); #endif -#ifdef ASN_BER_TO_DER +#if defined(ASN_BER_TO_DER) && \ + (defined(WOLFSSL_TEST_CERT) || defined(OPENSSL_EXTRA) || \ + defined(OPENSSL_EXTRA_X509_SMALL)) if ( (ret = berder_test()) != 0) return err_sys("ber-der test failed!\n", ret); else @@ -17692,7 +17694,10 @@ done: } #endif -#ifdef ASN_BER_TO_DER +#if defined(ASN_BER_TO_DER) && \ + (defined(WOLFSSL_TEST_CERT) || defined(OPENSSL_EXTRA) || \ + defined(OPENSSL_EXTRA_X509_SMALL)) +/* wc_BerToDer is only public facing in the case of test cert or opensslextra */ typedef struct berDerTestData { const byte *in; word32 inSz;