Commit 968b6c30 authored by Nick Mathewson's avatar Nick Mathewson 🌉
Browse files

Merge remote-tracking branch 'tor-gitlab/mr/43' into maint-0.3.5

parents e0e0ef71 40eb6b19
o Major bugfixes (NSS):
- When running with NSS enabled, make sure that NSS knows to expect
nonblocking sockets. Previously, we set our TCP sockets as blocking,
but did not tell NSS about the fact, which in turn could lead to
unexpected blocking behavior. Fixes bug 40035; bugfix on
......@@ -418,6 +418,16 @@ tor_tls_new(tor_socket_t sock, int is_server)
return NULL;
/* even if though the socket is already nonblocking, we need to tell NSS
* about the fact, so that it knows what to do when it says EAGAIN. */
PRSocketOptionData data;
data.option = PR_SockOpt_Nonblocking;
data.value.non_blocking = 1;
if (PR_SetSocketOption(ssl, &data) != PR_SUCCESS) {
return NULL;
tor_tls_t *tls = tor_malloc_zero(sizeof(tor_tls_t));
tls->magic = TOR_TLS_MAGIC;
tls->context = ctx;
Supports Markdown
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