]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve private keys.
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 3 Apr 2011 16:15:34 +0000 (18:15 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 3 Apr 2011 16:15:34 +0000 (18:15 +0200)
Misc/NEWS
Modules/_ssl.c

index da09cc99b59fd93bc3ed3e0ed13e3475e80f8b22..7d817fee8adf1804eafc9f786fa4b890d79eea00 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,6 +49,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
+  private keys.
+
 - sys.getfilesystemencoding() raises a RuntimeError if initfsencoding() was not
   called yet: detect bootstrap (startup) issues earlier.
 
index 141b1ae88cef0fcf5bd89e14bfeb7b81607924b8..e49426464e5cc984b79a7b95116abc4273680ab8 100644 (file)
@@ -1623,7 +1623,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