mirror of
https://github.com/python/cpython.git
synced 2025-09-14 12:46:49 +00:00
Issue #8222: Enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
reads and writes are always retried by OpenSSL itself. (this is a followup to issue #3890)
This commit is contained in:
parent
c7024e7fd6
commit
eee91cda80
2 changed files with 4 additions and 3 deletions
|
@ -59,7 +59,9 @@ Library
|
||||||
- Issue #8200: logging: Handle errors when multiprocessing is not
|
- Issue #8200: logging: Handle errors when multiprocessing is not
|
||||||
fully loaded when logging occurs.
|
fully loaded when logging occurs.
|
||||||
|
|
||||||
- Issue #3890: Fix recv() and recv_into() on non-blocking SSL sockets.
|
- Issue #3890, #8222: Fix recv() and recv_into() on non-blocking SSL sockets.
|
||||||
|
Also, enable the SSL_MODE_AUTO_RETRY flag on SSL sockets, so that blocking
|
||||||
|
reads and writes are always retried by OpenSSL itself.
|
||||||
|
|
||||||
- Issue #8179: Fix macpath.realpath() on a non-existing path.
|
- Issue #8179: Fix macpath.realpath() on a non-existing path.
|
||||||
|
|
||||||
|
|
|
@ -9,8 +9,6 @@
|
||||||
directly.
|
directly.
|
||||||
|
|
||||||
XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE?
|
XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE?
|
||||||
|
|
||||||
XXX what about SSL_MODE_AUTO_RETRY?
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "Python.h"
|
#include "Python.h"
|
||||||
|
@ -370,6 +368,7 @@ newPySSLObject(PySocketSockObject *Sock, char *key_file, char *cert_file,
|
||||||
self->ssl = SSL_new(self->ctx); /* New ssl struct */
|
self->ssl = SSL_new(self->ctx); /* New ssl struct */
|
||||||
PySSL_END_ALLOW_THREADS
|
PySSL_END_ALLOW_THREADS
|
||||||
SSL_set_fd(self->ssl, Sock->sock_fd); /* Set the socket for SSL */
|
SSL_set_fd(self->ssl, Sock->sock_fd); /* Set the socket for SSL */
|
||||||
|
SSL_set_mode(self->ssl, SSL_MODE_AUTO_RETRY);
|
||||||
|
|
||||||
/* If the socket is in non-blocking mode or timeout mode, set the BIO
|
/* If the socket is in non-blocking mode or timeout mode, set the BIO
|
||||||
* to non-blocking mode (blocking is the default)
|
* to non-blocking mode (blocking is the default)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue