mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
* gpgkeys_hkp.c (send_key): Do not escape the '=' in the HTTP POST when
uploading a key.
This commit is contained in:
parent
7b978efef8
commit
2c4b5d5de9
@ -1,3 +1,8 @@
|
|||||||
|
2006-01-16 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* gpgkeys_hkp.c (send_key): Do not escape the '=' in the HTTP POST
|
||||||
|
when uploading a key.
|
||||||
|
|
||||||
2005-12-23 David Shaw <dshaw@jabberwocky.com>
|
2005-12-23 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* ksutil.h, ksutil.c (parse_ks_options): New keyserver command
|
* ksutil.h, ksutil.c (parse_ks_options): New keyserver command
|
||||||
|
@ -88,18 +88,8 @@ send_key(int *eof)
|
|||||||
int begin=0,end=0,ret=KEYSERVER_INTERNAL_ERROR;
|
int begin=0,end=0,ret=KEYSERVER_INTERNAL_ERROR;
|
||||||
char keyid[17];
|
char keyid[17];
|
||||||
char line[MAX_LINE];
|
char line[MAX_LINE];
|
||||||
char *key,*encoded_key=NULL;
|
char *key=NULL,*encoded_key=NULL;
|
||||||
size_t keylen=8,keymax=8;
|
size_t keylen=0,keymax=0;
|
||||||
|
|
||||||
key=malloc(9);
|
|
||||||
if(!key)
|
|
||||||
{
|
|
||||||
fprintf(console,"gpgkeys: out of memory\n");
|
|
||||||
ret=KEYSERVER_NO_MEMORY;
|
|
||||||
goto fail;
|
|
||||||
}
|
|
||||||
|
|
||||||
strcpy(key,"keytext=");
|
|
||||||
|
|
||||||
/* Read and throw away input until we see the BEGIN */
|
/* Read and throw away input until we see the BEGIN */
|
||||||
|
|
||||||
@ -166,6 +156,19 @@ send_key(int *eof)
|
|||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(key);
|
||||||
|
|
||||||
|
key=malloc(8+strlen(encoded_key)+1);
|
||||||
|
if(!key)
|
||||||
|
{
|
||||||
|
fprintf(console,"gpgkeys: out of memory\n");
|
||||||
|
ret=KEYSERVER_NO_MEMORY;
|
||||||
|
goto fail;
|
||||||
|
}
|
||||||
|
|
||||||
|
strcpy(key,"keytext=");
|
||||||
|
strcat(key,encoded_key);
|
||||||
|
|
||||||
strcpy(request,"http://");
|
strcpy(request,"http://");
|
||||||
strcat(request,opt->host);
|
strcat(request,opt->host);
|
||||||
strcat(request,":");
|
strcat(request,":");
|
||||||
@ -183,7 +186,7 @@ send_key(int *eof)
|
|||||||
|
|
||||||
curl_easy_setopt(curl,CURLOPT_URL,request);
|
curl_easy_setopt(curl,CURLOPT_URL,request);
|
||||||
curl_easy_setopt(curl,CURLOPT_POST,1);
|
curl_easy_setopt(curl,CURLOPT_POST,1);
|
||||||
curl_easy_setopt(curl,CURLOPT_POSTFIELDS,encoded_key);
|
curl_easy_setopt(curl,CURLOPT_POSTFIELDS,key);
|
||||||
curl_easy_setopt(curl,CURLOPT_FAILONERROR,1);
|
curl_easy_setopt(curl,CURLOPT_FAILONERROR,1);
|
||||||
|
|
||||||
res=curl_easy_perform(curl);
|
res=curl_easy_perform(curl);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user