diff options
author | David Shaw <[email protected]> | 2006-02-21 05:20:08 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2006-02-21 05:20:08 +0000 |
commit | 8a1bd087fcc7bfcbaa389ae475708d1e2c7b9fcc (patch) | |
tree | 6d89a32fa35c972677fc02c2c67c26a5e50d3512 /g10/keyserver.c | |
parent | * http.c (send_request): A zero length proxy is the same as no proxy. (diff) | |
download | gnupg-8a1bd087fcc7bfcbaa389ae475708d1e2c7b9fcc.tar.gz gnupg-8a1bd087fcc7bfcbaa389ae475708d1e2c7b9fcc.zip |
* keyserver.c (parse_keyserver_uri): Include the scheme in the uri
even when we've assumed "hkp" when there was no scheme.
Diffstat (limited to 'g10/keyserver.c')
-rw-r--r-- | g10/keyserver.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/g10/keyserver.c b/g10/keyserver.c index 6c5514487..af65ad365 100644 --- a/g10/keyserver.c +++ b/g10/keyserver.c @@ -215,8 +215,6 @@ parse_keyserver_uri(const char *uri,int require_scheme, keyserver=xmalloc_clear(sizeof(struct keyserver_spec)); - keyserver->uri=xstrdup(uri); - /* Get the scheme */ for(idx=uri,count=0;*idx && *idx!=':';idx++) @@ -247,11 +245,18 @@ parse_keyserver_uri(const char *uri,int require_scheme, /* Assume HKP if there is no scheme */ assume_hkp=1; keyserver->scheme=xstrdup("hkp"); + + keyserver->uri=xmalloc(strlen(keyserver->scheme)+3+strlen(uri)+1); + strcpy(keyserver->uri,keyserver->scheme); + strcat(keyserver->uri,"://"); + strcat(keyserver->uri,uri); } else { int i; + keyserver->uri=xstrdup(uri); + keyserver->scheme=xmalloc(count+1); /* Force to lowercase */ |