diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2010-03-26 19:27:16 (GMT) |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-03-26 19:27:16 (GMT) |
| commit | eee91cda8012d7d39c0401a0465af736aa2d136a (patch) | |
| tree | e79fdbcb7ceb5d3bf26408c7ae2a53fd14119894 /Modules/_ssl.c | |
| parent | c7024e7fd61e349ed51e625d3649b9f09c1436b5 (diff) | |
| download | cpython-eee91cda8012d7d39c0401a0465af736aa2d136a.zip cpython-eee91cda8012d7d39c0401a0465af736aa2d136a.tar.gz cpython-eee91cda8012d7d39c0401a0465af736aa2d136a.tar.bz2 | |
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)
Diffstat (limited to 'Modules/_ssl.c')
| -rw-r--r-- | Modules/_ssl.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/_ssl.c b/Modules/_ssl.c index f5f9eba..52fdf0f 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -9,8 +9,6 @@ directly. XXX should partial writes be enabled, SSL_MODE_ENABLE_PARTIAL_WRITE? - - XXX what about SSL_MODE_AUTO_RETRY? */ #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 */ PySSL_END_ALLOW_THREADS 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 * to non-blocking mode (blocking is the default) |
