Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
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
Benjamin J. Thompson
Tor
Commits
45c46129
Commit
45c46129
authored
13 years ago
by
Nick Mathewson
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Fix issues pointed out by nickm."
This reverts commit
e097bffa
.
parent
616b60ce
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/common/tortls.c
+10
-16
10 additions, 16 deletions
src/common/tortls.c
with
10 additions
and
16 deletions
src/common/tortls.c
+
10
−
16
View file @
45c46129
...
...
@@ -1323,21 +1323,17 @@ tor_tls_client_is_using_v2_ciphers(const SSL *ssl, const char *address)
return
1
;
}
/** We
got an SSL ClientHello messag
e. This might mean
that the
*
client wants to initia
te a renegotiation and appropriate actions
*
must be
taken. */
/** We
sent the ServerHello part of an SSL handshak
e. This might mean
*
that we comple
te
d
a renegotiation and appropriate actions
must be
* taken. */
static
void
tor_tls_got_
client
_hello
(
tor_tls_t
*
tls
)
tor_tls_got_
server
_hello
(
tor_tls_t
*
tls
)
{
if
(
tls
->
server_handshake_count
<
3
)
++
tls
->
server_handshake_count
;
if
(
tls
->
server_handshake_count
==
2
)
{
if
(
!
tls
->
negotiated_callback
)
{
log_warn
(
LD_BUG
,
"Got a renegotiation request but we don't"
" have a renegotiation callback set!"
);
}
tor_assert
(
tls
->
negotiated_callback
);
tls
->
got_renegotiate
=
1
;
}
...
...
@@ -1380,8 +1376,8 @@ tor_tls_state_changed_callback(const SSL *ssl, int type, int val)
if
(
type
==
SSL_CB_ACCEPT_LOOP
&&
ssl
->
state
==
SSL3_ST_SW_SRVR_HELLO_A
)
{
/* Call tor_tls_got_
client
_hello() for every SSL
Client
Hello we
receive
. */
/* Call tor_tls_got_
server
_hello() for every SSL
Server
Hello we
send
. */
tor_tls_t
*
tls
=
tor_tls_get_by_ssl
(
ssl
);
if
(
!
tls
)
{
...
...
@@ -1389,7 +1385,7 @@ tor_tls_state_changed_callback(const SSL *ssl, int type, int val)
return
;
}
tor_tls_got_
client
_hello
(
tls
);
tor_tls_got_
server
_hello
(
tls
);
}
#endif
...
...
@@ -1660,10 +1656,8 @@ tor_tls_read(tor_tls_t *tls, char *cp, size_t len)
#ifdef V2_HANDSHAKE_SERVER
if
(
tls
->
got_renegotiate
)
{
if
(
tls
->
server_handshake_count
!=
2
)
{
log_warn
(
LD_BUG
,
"We did not notice renegotiation in a timely fashion (%u)!"
,
tls
->
server_handshake_count
);
}
tor_assert
(
tls
->
server_handshake_count
==
2
);
/* XXX tor_assert(err == TOR_TLS_WANTREAD); */
/* Renegotiation happened! */
log_info
(
LD_NET
,
"Got a TLS renegotiation from %s"
,
ADDR
(
tls
));
...
...
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