From: Philip Prindeville Date: Wed, 27 Mar 2024 23:41:18 +0000 (-0600) Subject: wolfssl: Avoid conflict with RNG when built without EdDSA or FIPS enabled X-Git-Tag: android-2.5.2~33^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e5bc3a50f6d326fd51dea5febee74e1ed7fb1e5e;p=thirdparty%2Fstrongswan.git wolfssl: Avoid conflict with RNG when built without EdDSA or FIPS enabled There are definitions of RNG in and that play havoc with the literal RNG being used in the expansions of PLUGIN_*(RNG, ...) when ##-concatenated to build the enum value FEATURE_RNG. The #undef in wolfssl_cmmon.h only had an effect if wolfSSL was built with EdDSA or FIPS enabled, otherwise, the headers that define RNG were not pulled in before it. Signed-off-by: Philip Prindeville --- diff --git a/src/libstrongswan/plugins/wolfssl/wolfssl_common.h b/src/libstrongswan/plugins/wolfssl/wolfssl_common.h index 9c944e7119..98a5593aab 100644 --- a/src/libstrongswan/plugins/wolfssl/wolfssl_common.h +++ b/src/libstrongswan/plugins/wolfssl/wolfssl_common.h @@ -80,7 +80,4 @@ typedef union { #undef PARSE_ERROR -/* Eliminate macro conflicts */ -#undef RNG - #endif /* WOLFSSL_PLUGIN_COMMON_H_ */ diff --git a/src/libstrongswan/plugins/wolfssl/wolfssl_plugin.c b/src/libstrongswan/plugins/wolfssl/wolfssl_plugin.c index d4b4989b09..fa4edeeef9 100644 --- a/src/libstrongswan/plugins/wolfssl/wolfssl_plugin.c +++ b/src/libstrongswan/plugins/wolfssl/wolfssl_plugin.c @@ -47,6 +47,8 @@ #include +#undef RNG + #ifndef FIPS_MODE #define FIPS_MODE 0 #endif