diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c index 4f117b3afae7cf..a4889450821878 100644 --- a/Modules/_hashopenssl.c +++ b/Modules/_hashopenssl.c @@ -900,7 +900,7 @@ py_evp_fromname(PyObject *module, const char *digestname, PyObject *data_obj, goto exit; } -#if defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) && OPENSSL_VERSION_NUMBER >= 0x30000000L +#if defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) && OPENSSL_VERSION_NUMBER < 0x30000000L // In OpenSSL 1.1.1 the non FIPS allowed flag is context specific while // in 3.0.0 it is a different EVP_MD provider. if (!usedforsecurity) {