Skip to content

Commit f1a696e

Browse files
authored
bpo-29697: Don't use OpenSSL <1.0.2 fallback on 1.1+ (GH-399)
1 parent 9514969 commit f1a696e

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
@@ -2166,12 +2166,12 @@ context_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
21662166
options |= SSL_OP_NO_SSLv3;
21672167
SSL_CTX_set_options(self->ctx, options);
21682168

2169-
#ifndef OPENSSL_NO_ECDH
2169+
#if !defined(OPENSSL_NO_ECDH) && !defined(OPENSSL_VERSION_1_1)
21702170
/* Allow automatic ECDH curve selection (on OpenSSL 1.0.2+), or use
21712171
prime256v1 by default. This is Apache mod_ssl's initialization
21722172
policy, so we should be safe. OpenSSL 1.1 has it enabled by default.
21732173
*/
2174-
#if defined(SSL_CTX_set_ecdh_auto) && !defined(OPENSSL_VERSION_1_1)
2174+
#if defined(SSL_CTX_set_ecdh_auto)
21752175
SSL_CTX_set_ecdh_auto(self->ctx, 1);
21762176
#else
21772177
{

0 commit comments

Comments
 (0)