mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* keyserver.c (parse_keyserver_uri): Include the scheme in the uri
even when we've assumed "hkp" when there was no scheme.
This commit is contained in:
parent
ca6c57bc8a
commit
8a1bd087fc
2 changed files with 12 additions and 2 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue