summaryrefslogtreecommitdiffstats
path: root/Modules/_hashopenssl.c
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-01-13 20:47:42 (GMT)
committerGitHub <noreply@github.com>2022-01-13 20:47:42 (GMT)
commit276c234ce0fa6732237f1b187989837324d9dea3 (patch)
tree4864faecf422b4a1ab33c38da07e05576f340e33 /Modules/_hashopenssl.c
parent1a4d1c1c9b08e75e88aeac90901920938f649832 (diff)
downloadcpython-276c234ce0fa6732237f1b187989837324d9dea3.zip
cpython-276c234ce0fa6732237f1b187989837324d9dea3.tar.gz
cpython-276c234ce0fa6732237f1b187989837324d9dea3.tar.bz2
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
Diffstat (limited to 'Modules/_hashopenssl.c')
-rw-r--r--Modules/_hashopenssl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_hashopenssl.c b/Modules/_hashopenssl.c
index eeea61a..fb155b2 100644
--- a/Modules/_hashopenssl.c
+++ b/Modules/_hashopenssl.c
@@ -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) {