[Python-checkins] cpython (3.2): Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve private

antoine.pitrou python-checkins at python.org
Sun Apr 3 18:20:19 CEST 2011


http://hg.python.org/cpython/rev/88ed3de28520
changeset:   69114:88ed3de28520
branch:      3.2
parent:      69109:1fd736395df3
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sun Apr 03 18:15:34 2011 +0200
summary:
  Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve private keys.

files:
  Misc/NEWS      |  3 +++
  Modules/_ssl.c |  2 +-
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -49,6 +49,9 @@
 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.
 
diff --git a/Modules/_ssl.c b/Modules/_ssl.c
--- a/Modules/_ssl.c
+++ b/Modules/_ssl.c
@@ -1623,7 +1623,7 @@
         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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list