From cf61df129cde666fe9982e6fb9bd834dd959bc63 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Wed, 29 May 2024 17:08:01 -0600 Subject: [PATCH 1/2] fix typo with NO_CERTS macro --- examples/configs/user_settings_wolfboot_keytools.h | 2 +- src/ssl.c | 2 +- src/x509.c | 2 +- wolfcrypt/src/asn.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/configs/user_settings_wolfboot_keytools.h b/examples/configs/user_settings_wolfboot_keytools.h index ee283710b4..f10482d3e0 100644 --- a/examples/configs/user_settings_wolfboot_keytools.h +++ b/examples/configs/user_settings_wolfboot_keytools.h @@ -86,7 +86,7 @@ #define NO_RABBIT #define NO_MD5 #define NO_SIG_WRAPPER -#define NO_CERT +#define NO_CERTS #define NO_SESSION_CACHE #define NO_HC128 #define NO_DES3 diff --git a/src/ssl.c b/src/ssl.c index d027ef01b0..e26ced4566 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -23273,7 +23273,7 @@ wolfSSL_CTX_keylog_cb_func wolfSSL_CTX_get_keylog_callback( #endif /* OPENSSL_EXTRA */ -#ifndef NO_CERT +#ifndef NO_CERTS #define WOLFSSL_X509_INCLUDED #include "src/x509.c" #endif diff --git a/src/x509.c b/src/x509.c index 8da2ffdf57..19c145ce24 100644 --- a/src/x509.c +++ b/src/x509.c @@ -14583,7 +14583,7 @@ void wolfSSL_X509_ATTRIBUTE_free(WOLFSSL_X509_ATTRIBUTE* attr) } #endif -#endif /* !NO_CERT */ +#endif /* !NO_CERTS */ #endif /* !WOLFCRYPT_ONLY */ diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index f5ed8804ff..1c13d6ecaa 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -3534,7 +3534,7 @@ int CheckBitString(const byte* input, word32* inOutIdx, int* len, ((defined(HAVE_ED25519) || defined(HAVE_ED448)) && \ (defined(WOLFSSL_CERT_GEN) || defined(WOLFSSL_KEY_GEN) || \ defined(OPENSSL_EXTRA))) || \ - (defined(WC_ENABLE_ASYM_KEY_EXPORT) && !defined(NO_CERT)) || \ + (defined(WC_ENABLE_ASYM_KEY_EXPORT) && !defined(NO_CERTS)) || \ (!defined(NO_DSA) && !defined(HAVE_SELFTEST) && defined(WOLFSSL_KEY_GEN)) || \ (!defined(NO_DH) && defined(WOLFSSL_DH_EXTRA)) From 34ca03770fd130223e66c9784f0c289801cf1984 Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Thu, 30 May 2024 09:58:25 -0600 Subject: [PATCH 2/2] still compile in wc_RsaKeyToDer with keygen but NO_CERTS --- wolfcrypt/src/asn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wolfcrypt/src/asn.c b/wolfcrypt/src/asn.c index 1c13d6ecaa..fc0d831d5c 100644 --- a/wolfcrypt/src/asn.c +++ b/wolfcrypt/src/asn.c @@ -26112,6 +26112,7 @@ int wc_RsaKeyToPublicDer_ex(RsaKey* key, byte* output, word32 inLen, #endif /* !NO_RSA && (WOLFSSL_CERT_GEN || WOLFSSL_KCAPI_RSA || ((OPENSSL_EXTRA || WOLFSSL_KEY_GEN))) */ +#endif /* NO_CERTS */ #if (defined(WOLFSSL_KEY_GEN) || defined(OPENSSL_EXTRA) || \ defined(WOLFSSL_KCAPI_RSA) || defined(WOLFSSL_SE050)) && \ @@ -26282,6 +26283,7 @@ int wc_RsaKeyToDer(RsaKey* key, byte* output, word32 inLen) #endif /* (WOLFSSL_KEY_GEN || OPENSSL_EXTRA) && !NO_RSA */ +#ifndef NO_CERTS #ifdef WOLFSSL_CERT_GEN