Skip to content

Commit 276c234

Browse files
authored
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
1 parent 1a4d1c1 commit 276c234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_hashopenssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -883,7 +883,7 @@ py_evp_fromname(PyObject *module, const char *digestname, PyObject *data_obj,
883883
goto exit;
884884
}
885885

886-
#if defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) && OPENSSL_VERSION_NUMBER >= 0x30000000L
886+
#if defined(EVP_MD_CTX_FLAG_NON_FIPS_ALLOW) && OPENSSL_VERSION_NUMBER < 0x30000000L
887887
// In OpenSSL 1.1.1 the non FIPS allowed flag is context specific while
888888
// in 3.0.0 it is a different EVP_MD provider.
889889
if (!usedforsecurity) {

0 commit comments

Comments
 (0)