mirror of
https://github.com/python/cpython
synced 2026-09-29 08:05:30 +03:00
SSLContext.load_dh_params() now properly closes the input file.
This commit is contained in:
parent
69db587f86
commit
457a2292ca
2 changed files with 3 additions and 0 deletions
|
|
@ -147,6 +147,8 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- SSLContext.load_dh_params() now properly closes the input file.
|
||||
|
||||
- Issue #16829: IDLE printing no longer fails if there are spaces or other
|
||||
special characters in the file path.
|
||||
|
||||
|
|
|
|||
|
|
@ -2177,6 +2177,7 @@ load_dh_params(PySSLContext *self, PyObject *filepath)
|
|||
errno = 0;
|
||||
PySSL_BEGIN_ALLOW_THREADS
|
||||
dh = PEM_read_DHparams(f, NULL, NULL, NULL);
|
||||
fclose(f);
|
||||
PySSL_END_ALLOW_THREADS
|
||||
if (dh == NULL) {
|
||||
if (errno != 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue