diff options
author | David Shaw <dshaw@jabberwocky.com> | 2002-07-09 21:40:18 +0200 |
---|---|---|
committer | David Shaw <dshaw@jabberwocky.com> | 2002-07-09 21:40:18 +0200 |
commit | 9ffea0d67b13d863f73578e25f533652e58136bf (patch) | |
tree | 831f490e40a68319b7514b19e46dd6f954495878 /g10/hkp.c | |
parent | * gpgkeys_mailto.in: Use new OPAQUE tag for non net-path URIs. Fail more (diff) | |
download | gnupg2-9ffea0d67b13d863f73578e25f533652e58136bf.tar.xz gnupg2-9ffea0d67b13d863f73578e25f533652e58136bf.zip |
* options.h, keyserver.c (parse_keyserver_uri, keyserver_spawn,
keyserver_work), hkp.c (hkp_ask_import, hkp_export, hkp_search): Use a
much more strict reading of RFC-2396 for the keyserver URIs. Specifically,
don't try and be smart about checking the value of ":port" so long as it
is all digits, and properly handle opaque data (those scheme specific
parts that do not start with "//").
Diffstat (limited to 'g10/hkp.c')
-rw-r--r-- | g10/hkp.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -84,8 +84,8 @@ hkp_ask_import( KEYDB_SEARCH_DESC *desc, void *stats_handle) sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=get&search=0x%08lX", opt.keyserver_host, - atoi(opt.keyserver_port)>0?":":"", - atoi(opt.keyserver_port)>0?opt.keyserver_port:"", + opt.keyserver_port?":":"", + opt.keyserver_port?opt.keyserver_port:"", (ulong)key[1] ); if(opt.keyserver_options.verbose>2) @@ -138,8 +138,8 @@ hkp_export( STRLIST users ) sprintf( request, "x-hkp://%s%s%s/pks/add", opt.keyserver_host, - atoi(opt.keyserver_port)>0?":":"", - atoi(opt.keyserver_port)>0?opt.keyserver_port:""); + opt.keyserver_port?":":"", + opt.keyserver_port?opt.keyserver_port:""); if(opt.keyserver_options.verbose>2) log_info("request is \"%s\"\n",request); @@ -532,8 +532,8 @@ int hkp_search(STRLIST tokens) sprintf(request,"x-hkp://%s%s%s/pks/lookup?op=index&search=%s", opt.keyserver_host, - atoi(opt.keyserver_port)>0?":":"", - atoi(opt.keyserver_port)>0?opt.keyserver_port:"", + opt.keyserver_port?":":"", + opt.keyserver_port?opt.keyserver_port:"", searchurl); if(opt.keyserver_options.verbose>2) |