summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS3
-rw-r--r--Modules/_ssl.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index bba0f44..9fa8853 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -87,6 +87,9 @@ Core and Builtins
Library
-------
+- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
+ private keys.
+
- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
file-like objects using a new ``fileobj`` constructor argument. Patch by
Nadeem Vawda.
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
index d077895..0ae02a1 100644
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1620,7 +1620,7 @@ load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
goto error;
}
PySSL_BEGIN_ALLOW_THREADS
- r = SSL_CTX_use_RSAPrivateKey_file(self->ctx,
+ r = SSL_CTX_use_PrivateKey_file(self->ctx,
PyBytes_AS_STRING(keyfile ? keyfile_bytes : certfile_bytes),
SSL_FILETYPE_PEM);
PySSL_END_ALLOW_THREADS