bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)

This commit is contained in:
Christian Heimes 2022-01-13 22:47:42 +02:00 committed by GitHub
parent 1a4d1c1c9b
commit 276c234ce0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -883,7 +883,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) {