mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* ksutil.h, ksutil.c (curl_armor_writer, curl_writer,
curl_writer_finalize): New functionality to handle binary format keys by armoring them for input to GPG. * gpgkeys_curl.c (get_key), gpgkeys_hkp.c (get_key): Call it here.
This commit is contained in:
parent
aebd3a04f3
commit
5432755319
5 changed files with 165 additions and 47 deletions
|
@ -263,21 +263,22 @@ get_key(char *getkey)
|
|||
curl_easy_setopt(curl,CURLOPT_FILE,&ctx);
|
||||
|
||||
res=curl_easy_perform(curl);
|
||||
if(res!=0)
|
||||
if(res!=CURLE_OK)
|
||||
{
|
||||
fprintf(console,"gpgkeys: HTTP fetch error %d: %s\n",res,errorbuffer);
|
||||
fprintf(output,"\nKEY 0x%s FAILED %d\n",getkey,curl_err_to_gpg_err(res));
|
||||
}
|
||||
else
|
||||
{
|
||||
if(ctx.done)
|
||||
fprintf(output,"\nKEY 0x%s END\n",getkey);
|
||||
else
|
||||
curl_writer_finalize(&ctx);
|
||||
if(!ctx.flags.done)
|
||||
{
|
||||
fprintf(console,"gpgkeys: key %s not found on keyserver\n",getkey);
|
||||
fprintf(output,"KEY 0x%s FAILED %d\n",
|
||||
fprintf(output,"\nKEY 0x%s FAILED %d\n",
|
||||
getkey,KEYSERVER_KEY_NOT_FOUND);
|
||||
}
|
||||
else
|
||||
fprintf(output,"\nKEY 0x%s END\n",getkey);
|
||||
}
|
||||
|
||||
return KEYSERVER_OK;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue