aboutsummaryrefslogtreecommitdiffstats
path: root/common/t-http.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2015-09-18 13:58:26 +0000
committerWerner Koch <[email protected]>2015-09-18 14:21:30 +0000
commitb4bc1c8b10c7a794fa108678b80f76366a65c47d (patch)
tree6a6d0548876822bba89b19df36ad4d8fa38ef72a /common/t-http.c
parentpo: Update Japanese translation. (diff)
downloadgnupg-b4bc1c8b10c7a794fa108678b80f76366a65c47d.tar.gz
gnupg-b4bc1c8b10c7a794fa108678b80f76366a65c47d.zip
http: Add flag to force use of TOR (part 1)
* common/http.h (HTTP_FLAG_FORCE_TOR): New. * common/http.c (http_raw_connect, send_request): Detect flag and return an error for now. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to '')
-rw-r--r--common/t-http.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/t-http.c b/common/t-http.c
index e031ef943..41b2dd118 100644
--- a/common/t-http.c
+++ b/common/t-http.c
@@ -174,6 +174,7 @@ main (int argc, char **argv)
" --cacert FNAME expect CA certificate in file FNAME\n"
" --no-verify do not verify the certificate\n"
" --force-tls use HTTP_FLAG_FORCE_TLS\n"
+ " --force-tor use HTTP_FLAG_FORCE_TOR\n"
" --no-out do not print the content\n",
stdout);
exit (0);
@@ -217,6 +218,11 @@ main (int argc, char **argv)
my_http_flags |= HTTP_FLAG_FORCE_TLS;
argc--; argv++;
}
+ else if (!strcmp (*argv, "--force-tor"))
+ {
+ my_http_flags |= HTTP_FLAG_FORCE_TOR;
+ argc--; argv++;
+ }
else if (!strcmp (*argv, "--no-out"))
{
no_out = 1;
@@ -316,6 +322,8 @@ main (int argc, char **argv)
printf ("TLS : %s\n",
uri->use_tls? "yes":
(my_http_flags&HTTP_FLAG_FORCE_TLS)? "forced" : "no");
+ printf ("Tor : %s\n",
+ (my_http_flags&HTTP_FLAG_FORCE_TOR)? "yes" : "no");
}
fflush (stdout);