Skip to content

Commit 784ba7c

Browse files
authored
bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (#397)
1 parent b05d48e commit 784ba7c

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
@@ -2729,12 +2729,12 @@ _ssl__SSLContext_impl(PyTypeObject *type, int proto_version)
27292729
#endif
27302730

27312731

2732-
#ifndef OPENSSL_NO_ECDH
2732+
#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
27332733
/* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use
27342734
prime256v1 by default. This is Apache mod_ssl's initialization
27352735
policy, so we should be safe. OpenSSL 1.1 has it enabled by default.
27362736
*/
2737-
#if defined(SSL_CTX_set_ecdh_auto) && !defined(OPENSSL_VERSION_1_1)
2737+
#if defined(SSL_CTX_set_ecdh_auto)
27382738
SSL_CTX_set_ecdh_auto(self->ctx, 1);
27392739
#else
27402740
{

0 commit comments

Comments
 (0)