From 63c85f72d25cda523ea9bbe833621c90b6cfcf71 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Mon, 5 Jun 2017 15:21:34 -0600 Subject: [PATCH] sanity check on build with ECC or RSA --- wolfcrypt/src/asn.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index f615728d8..cc4d036be 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -8711,16 +8711,24 @@ int wc_SignCert(int requestSz, int sType, byte* buffer, word32 buffSz, /* locate ctx */ if (rsaKey) { + #ifndef NO_RSA #ifdef WOLFSSL_ASYNC_CRYPT certSignCtx = &rsaKey->certSignCtx; #endif heap = rsaKey->heap; + #else + return NOT_COMPILED_IN; + #endif /* NO_RSA */ } else if (eccKey) { + #ifdef HAVE_ECC #ifdef WOLFSSL_ASYNC_CRYPT certSignCtx = &eccKey->certSignCtx; #endif heap = eccKey->heap; + #else + return NOT_COMPILED_IN; + #endif /* HAVE_ECC */ } #ifdef WOLFSSL_ASYNC_CRYPT