diff --git a/src/libstrongswan/plugins/openssl/openssl_plugin.c b/src/libstrongswan/plugins/openssl/openssl_plugin.c index c2dbf5328..069136df0 100644 --- a/src/libstrongswan/plugins/openssl/openssl_plugin.c +++ b/src/libstrongswan/plugins/openssl/openssl_plugin.c @@ -243,8 +243,11 @@ static void threading_cleanup() #endif +#if OPENSSL_VERSION_NUMBER < 0x1010100fL /** * Seed the OpenSSL RNG, if required + * Not necessary anymore with OpenSSL 1.1.1 (maybe wasn't already earlier, but + * it's now explicitly mentioned in the documentation). */ static bool seed_rng() { @@ -271,6 +274,7 @@ static bool seed_rng() DESTROY_IF(rng); return TRUE; } +#endif /* OPENSSL_VERSION_NUMBER */ /** * Generic key loader @@ -839,12 +843,14 @@ plugin_t *openssl_plugin_create() "openssl FIPS mode(%d) - %sabled ", fips_mode, fips_mode ? "en" : "dis"); #endif /* OPENSSL_FIPS */ +#if OPENSSL_VERSION_NUMBER < 0x1010100fL if (!seed_rng()) { DBG1(DBG_CFG, "no RNG found to seed OpenSSL"); destroy(this); return NULL; } +#endif /* OPENSSL_VERSION_NUMBER */ return &this->public.plugin; }