Kaydet (Commit) 457a2292 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

SSLContext.load_dh_params() now properly closes the input file.

üst 69db587f
...@@ -147,6 +147,8 @@ Core and Builtins ...@@ -147,6 +147,8 @@ Core and Builtins
Library Library
------- -------
- SSLContext.load_dh_params() now properly closes the input file.
- Issue #16829: IDLE printing no longer fails if there are spaces or other - Issue #16829: IDLE printing no longer fails if there are spaces or other
special characters in the file path. special characters in the file path.
......
...@@ -2177,6 +2177,7 @@ load_dh_params(PySSLContext *self, PyObject *filepath) ...@@ -2177,6 +2177,7 @@ load_dh_params(PySSLContext *self, PyObject *filepath)
errno = 0; errno = 0;
PySSL_BEGIN_ALLOW_THREADS PySSL_BEGIN_ALLOW_THREADS
dh = PEM_read_DHparams(f, NULL, NULL, NULL); dh = PEM_read_DHparams(f, NULL, NULL, NULL);
fclose(f);
PySSL_END_ALLOW_THREADS PySSL_END_ALLOW_THREADS
if (dh == NULL) { if (dh == NULL) {
if (errno != 0) { if (errno != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment