From 7dedfe08efc1225a4e56c8c4f657c5a8e7febc8f Mon Sep 17 00:00:00 2001 From: Daniel Pouzzner Date: Sun, 19 Nov 2023 17:22:46 -0600 Subject: [PATCH] cryptonly and linuxkm fixes: fix --enable-all[-crypto] with --enable-opensslextra and --enable-cryptonly (build failures detected by multi-test linuxkm-all-asm-cryptonly-opensslextra-pie after merge of 54f2d56300 and e2bbacd548). --- configure.ac | 2 +- linuxkm/module_exports.c.template | 4 +++- src/ssl_crypto.c | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/configure.ac b/configure.ac index aed27d36d..b88555571 100644 --- a/configure.ac +++ b/configure.ac @@ -798,7 +798,7 @@ then if test "$ENABLED_LINUXKM_DEFAULTS" != "yes" then test "$enable_compkey" = "" && enable_compkey=yes - test "$enable_quic" = "" && enable_quic=yes + test "$enable_quic" = "" && test "$enable_cryptonly" != "yes" && enable_quic=yes AM_CFLAGS="$AM_CFLAGS -DHAVE_CRL_IO -DHAVE_IO_TIMEOUT" fi diff --git a/linuxkm/module_exports.c.template b/linuxkm/module_exports.c.template index 62d6cf1c5..b8266f84b 100644 --- a/linuxkm/module_exports.c.template +++ b/linuxkm/module_exports.c.template @@ -151,12 +151,14 @@ #ifdef OPENSSL_EXTRA #ifndef WOLFCRYPT_ONLY - #include + #include #endif #include #include #include #include + #include + #include #endif #if defined(NO_FILESYSTEM) diff --git a/src/ssl_crypto.c b/src/ssl_crypto.c index 591e69c21..b7ff5a19e 100644 --- a/src/ssl_crypto.c +++ b/src/ssl_crypto.c @@ -2061,7 +2061,7 @@ size_t wolfSSL_HMAC_size(const WOLFSSL_HMAC_CTX* ctx) * START OF CMAC API ******************************************************************************/ -#ifdef OPENSSL_EXTRA +#if defined(OPENSSL_EXTRA) && !defined(WOLFCRYPT_ONLY) #if defined(WOLFSSL_CMAC) && defined(OPENSSL_EXTRA) && \ defined(WOLFSSL_AES_DIRECT) /* Allocate a new CMAC context object. @@ -2275,7 +2275,7 @@ int wolfSSL_CMAC_Final(WOLFSSL_CMAC_CTX* ctx, unsigned char* out, size_t* len) return ret; } #endif /* WOLFSSL_CMAC && OPENSSL_EXTRA && WOLFSSL_AES_DIRECT */ -#endif /* OPENSSL_EXTRA */ +#endif /* OPENSSL_EXTRA && !WOLFCRYPT_ONLY */ /******************************************************************************* * END OF CMAC API