Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sergi
Tor
Commits
40eb6b19
Commit
40eb6b19
authored
4 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
NSS: Tell NSS that our SSL sockets are nonblocking.
Closes ticket 40035.
parent
c9751e26
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
changes/ticket40035
+5
-0
5 additions, 0 deletions
changes/ticket40035
src/lib/tls/tortls_nss.c
+10
-0
10 additions, 0 deletions
src/lib/tls/tortls_nss.c
with
15 additions
and
0 deletions
changes/ticket40035
0 → 100644
+
5
−
0
View file @
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 0.3.5.1-alpha.
This diff is collapsed.
Click to expand it.
src/lib/tls/tortls_nss.c
+
10
−
0
View file @
40eb6b19
...
...
@@ -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
)
{
PR_Close
(
ssl
);
return
NULL
;
}
tor_tls_t
*
tls
=
tor_malloc_zero
(
sizeof
(
tor_tls_t
));
tls
->
magic
=
TOR_TLS_MAGIC
;
tls
->
context
=
ctx
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment