]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40479: Fix typo, flag must be set for OpenSSL < 3.0.0 (GH-30584)
authorChristian Heimes <christian@python.org>
Thu, 13 Jan 2022 20:47:42 +0000 (22:47 +0200)
committerGitHub <noreply@github.com>
Thu, 13 Jan 2022 20:47:42 +0000 (21:47 +0100)
Modules/_hashopenssl.c

index eeea61aeceb54299066be3ed589b41ba909f8c06..fb155b2e62253175e72c49c69ef34ec85f2d2e16 100644 (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) {