winpr: avoid calling FIPS_mode() with OpenSSL 3.0

Fixes: 26bf2816c3
This commit is contained in:
Mike Gilbert 2021-08-01 12:14:43 -04:00 committed by akallabeth
parent 0976cce458
commit 0c81c73c8d
1 changed files with 2 additions and 0 deletions

View File

@ -364,6 +364,8 @@ BOOL winpr_FIPSMode(void)
{
#if (OPENSSL_VERSION_NUMBER < 0x10001000L) || defined(LIBRESSL_VERSION_NUMBER)
return FALSE;
#elif defined(OPENSSL_VERSION_MAJOR) && (OPENSSL_VERSION_MAJOR >= 3)
return (EVP_default_properties_is_fips_enabled(NULL) == 1);
#else
return (FIPS_mode() == 1);
#endif