Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Core
debian
tor
Commits
7a18ac74
Commit
7a18ac74
authored
10 years ago
by
Yawning Angel
Browse files
Options
Downloads
Patches
Plain Diff
Fixed the test build with --enable-gcc-warnings
parent
41d2b4d3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/test_pt.c
+14
-14
14 additions, 14 deletions
src/test/test_pt.c
with
14 additions
and
14 deletions
src/test/test_pt.c
+
14
−
14
View file @
7a18ac74
...
...
@@ -464,7 +464,7 @@ test_get_pt_proxy_uri(void *arg)
tt_assert
(
uri
==
NULL
);
/* Test with a SOCKS4 proxy. */
options
->
Socks4Proxy
=
"192.0.2.1:1080"
;
options
->
Socks4Proxy
=
tor_strdup
(
"192.0.2.1:1080"
)
;
ret
=
tor_addr_port_lookup
(
options
->
Socks4Proxy
,
&
options
->
Socks4ProxyAddr
,
&
options
->
Socks4ProxyPort
);
...
...
@@ -472,11 +472,10 @@ test_get_pt_proxy_uri(void *arg)
uri
=
get_pt_proxy_uri
();
tt_str_op
(
uri
,
==
,
"socks4a://192.0.2.1:1080"
);
tor_free
(
uri
);
options
->
Socks4Proxy
=
NULL
;
tor_free
(
options
->
Socks4Proxy
);
/* Test with a SOCKS5 proxy, no username/password. */
options
->
Socks5Proxy
=
"192.0.2.1:1080"
;
options
->
Socks5Proxy
=
tor_strdup
(
"192.0.2.1:1080"
)
;
ret
=
tor_addr_port_lookup
(
options
->
Socks5Proxy
,
&
options
->
Socks5ProxyAddr
,
&
options
->
Socks5ProxyPort
);
...
...
@@ -486,16 +485,17 @@ test_get_pt_proxy_uri(void *arg)
tor_free
(
uri
);
/* Test with a SOCKS5 proxy, with username/password. */
options
->
Socks5ProxyUsername
=
"hwest"
;
options
->
Socks5ProxyPassword
=
"r34n1m470r"
;
options
->
Socks5ProxyUsername
=
tor_strdup
(
"hwest"
)
;
options
->
Socks5ProxyPassword
=
tor_strdup
(
"r34n1m470r"
)
;
uri
=
get_pt_proxy_uri
();
tt_str_op
(
uri
,
==
,
"socks5://hwest:r34n1m470r@192.0.2.1:1080"
);
tor_free
(
uri
);
options
->
Socks5Proxy
=
NULL
;
tor_free
(
options
->
Socks5Proxy
);
tor_free
(
options
->
Socks5ProxyUsername
);
tor_free
(
options
->
Socks5ProxyPassword
);
/* Test with a HTTPS proxy, no authenticator. */
options
->
HTTPSProxy
=
"192.0.2.1:80"
;
options
->
HTTPSProxy
=
tor_strdup
(
"192.0.2.1:80"
)
;
ret
=
tor_addr_port_lookup
(
options
->
HTTPSProxy
,
&
options
->
HTTPSProxyAddr
,
&
options
->
HTTPSProxyPort
);
...
...
@@ -505,15 +505,15 @@ test_get_pt_proxy_uri(void *arg)
tor_free
(
uri
);
/* Test with a HTTPS proxy, with authenticator. */
options
->
HTTPSProxyAuthenticator
=
"hwest:r34n1m470r"
;
options
->
HTTPSProxyAuthenticator
=
tor_strdup
(
"hwest:r34n1m470r"
)
;
uri
=
get_pt_proxy_uri
();
tt_str_op
(
uri
,
==
,
"http://hwest:r34n1m470r@192.0.2.1:80"
);
tor_free
(
uri
);
options
->
HTTPSProxy
=
NULL
;
tor_free
(
options
->
HTTPSProxy
);
tor_free
(
options
->
HTTPSProxy
Authenticator
)
;
/* Token nod to the fact that IPv6 exists. */
options
->
Socks4Proxy
=
"[2001:db8::1]:1080"
;
options
->
Socks4Proxy
=
tor_strdup
(
"[2001:db8::1]:1080"
)
;
ret
=
tor_addr_port_lookup
(
options
->
Socks4Proxy
,
&
options
->
Socks4ProxyAddr
,
&
options
->
Socks4ProxyPort
);
...
...
@@ -521,7 +521,7 @@ test_get_pt_proxy_uri(void *arg)
uri
=
get_pt_proxy_uri
();
tt_str_op
(
uri
,
==
,
"socks4a://[2001:db8::1]:1080"
);
tor_free
(
uri
);
tor_free
(
options
->
Socks4Proxy
);
done:
if
(
uri
)
...
...
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