Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a7caec7

Browse files
committed
Merge fix for issue #11746
2 parents 24ce386 + 9c25486 commit a7caec7

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ Core and Builtins
8787
Library
8888
-------
8989

90+
- Issue #11746: Fix SSLContext.load_cert_chain() to accept elliptic curve
91+
private keys.
92+
9093
- Issue #5863: Rewrite BZ2File in pure Python, and allow it to accept
9194
file-like objects using a new ``fileobj`` constructor argument. Patch by
9295
Nadeem Vawda.

Modules/_ssl.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,7 +1620,7 @@ load_cert_chain(PySSLContext *self, PyObject *args, PyObject *kwds)
16201620
goto error;
16211621
}
16221622
PySSL_BEGIN_ALLOW_THREADS
1623-
r = SSL_CTX_use_RSAPrivateKey_file(self->ctx,
1623+
r = SSL_CTX_use_PrivateKey_file(self->ctx,
16241624
PyBytes_AS_STRING(keyfile ? keyfile_bytes : certfile_bytes),
16251625
SSL_FILETYPE_PEM);
16261626
PySSL_END_ALLOW_THREADS

0 commit comments

Comments
 (0)