Skip to content

Commit 8ae264c

Browse files
authored
bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-395)
1 parent c643a96 commit 8ae264c

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

27302730

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

0 commit comments

Comments
 (0)