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
Mike Perry
Tor
Commits
543e4e8f
Commit
543e4e8f
authored
21 years ago
by
Roger Dingledine
Browse files
Options
Downloads
Patches
Plain Diff
more details to track a warning in tls handshakes
plus make exit policy comparisons not always reject svn:r559
parent
aca4bc51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/or/connection_or.c
+8
-4
8 additions, 4 deletions
src/or/connection_or.c
src/or/routers.c
+2
-3
2 additions, 3 deletions
src/or/routers.c
with
10 additions
and
7 deletions
src/or/connection_or.c
+
8
−
4
View file @
543e4e8f
...
...
@@ -188,12 +188,14 @@ static int connection_tls_finish_handshake(connection_t *conn) {
if
(
tor_tls_peer_has_cert
(
conn
->
tls
))
{
/* it's another OR */
pk
=
tor_tls_verify
(
conn
->
tls
);
if
(
!
pk
)
{
log_fn
(
LOG_WARNING
,
"Other side has a cert but it's invalid. Closing."
);
log_fn
(
LOG_WARNING
,
"Other side (%s:%p) has a cert but it's invalid. Closing."
,
conn
->
address
,
conn
->
port
);
return
-
1
;
}
router
=
router_get_by_link_pk
(
pk
);
if
(
!
router
)
{
log_fn
(
LOG_WARNING
,
"Unrecognized public key from peer. Closing."
);
log_fn
(
LOG_WARNING
,
"Unrecognized public key from peer (%s:%d). Closing."
,
conn
->
address
,
conn
->
port
);
crypto_free_pk_env
(
pk
);
return
-
1
;
}
...
...
@@ -223,12 +225,14 @@ static int connection_tls_finish_handshake(connection_t *conn) {
}
pk
=
tor_tls_verify
(
conn
->
tls
);
if
(
!
pk
)
{
log_fn
(
LOG_WARNING
,
"Other side has a cert but it's invalid. Closing."
);
log_fn
(
LOG_WARNING
,
"Other side (%s:%d) has a cert but it's invalid. Closing."
,
conn
->
address
,
conn
->
port
);
return
-
1
;
}
router
=
router_get_by_link_pk
(
pk
);
if
(
!
router
)
{
log_fn
(
LOG_WARNING
,
"Unrecognized public key from peer. Closing."
);
log_fn
(
LOG_WARNING
,
"Unrecognized public key from peer (%s:%d). Closing."
,
conn
->
address
,
conn
->
port
);
crypto_free_pk_env
(
pk
);
return
-
1
;
}
...
...
This diff is collapsed.
Click to expand it.
src/or/routers.c
+
2
−
3
View file @
543e4e8f
...
...
@@ -1083,7 +1083,8 @@ int router_compare_to_exit_policy(connection_t *conn) {
assert
(
tmpe
->
port
);
log_fn
(
LOG_DEBUG
,
"Considering exit policy %s:%s"
,
tmpe
->
address
,
tmpe
->
port
);
if
(
inet_aton
(
tmpe
->
address
,
&
in
)
==
0
)
{
/* malformed IP. reject. */
if
(
strcmp
(
tmpe
->
address
,
"*"
)
&&
inet_aton
(
tmpe
->
address
,
&
in
)
==
0
)
{
/* malformed IP. reject. */
log_fn
(
LOG_WARNING
,
"Malformed IP %s in exit policy. Rejecting."
,
tmpe
->
address
);
return
-
1
;
}
...
...
@@ -1287,8 +1288,6 @@ int router_dump_router_to_string(char *s, int maxlen, routerinfo_t *router,
return
written
+
1
;
}
/*
Local Variables:
mode:c
...
...
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