Skip to content

Commit 564ace8

Browse files
authored
bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-398)
1 parent df11ce6 commit 564ace8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_ssl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2418,12 +2418,12 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
24182418
#endif
24192419

24202420

2421-
#ifndef OPENSSL_NO_ECDH
2421+
#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
24222422
/* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use
24232423
prime256v1 by default. This is Apache mod_ssl's initialization
24242424
policy, so we should be safe. OpenSSL 1.1 has it enabled by default.
24252425
*/
2426-
#if defined(SSL_CTX_set_ecdh_auto) && !defined(OPENSSL_VERSION_1_1)
2426+
#if defined(SSL_CTX_set_ecdh_auto)
24272427
SSL_CTX_set_ecdh_auto(self->ctx, 1);
24282428
#else
24292429
{

0 commit comments

Comments
 (0)