1
0
mirror of git://git.gnupg.org/gnupg.git synced 2025-03-12 23:01:14 +01:00

* gpgkeys_finger.c (get_key), gpgkeys_curl.c (get_key): Better language

for the key-not-found error.
This commit is contained in:
David Shaw 2005-12-07 23:00:30 +00:00
parent 05193a2705
commit a4fae95d04
3 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,8 @@
2005-12-07 David Shaw <dshaw@jabberwocky.com>
* gpgkeys_finger.c (get_key), gpgkeys_curl.c (get_key): Better
language for the key-not-found error.
* ksutil.c (curl_err_to_gpg_err): Add CURLE_OK and
CURLE_COULDNT_CONNECT.

View File

@ -50,7 +50,6 @@ get_key(char *getkey)
char errorbuffer[CURL_ERROR_SIZE];
char request[MAX_URL];
struct curl_writer_ctx ctx;
int ret=KEYSERVER_OK;
memset(&ctx,0,sizeof(ctx));
@ -71,21 +70,19 @@ get_key(char *getkey)
res=curl_easy_perform(curl);
if(res!=CURLE_OK)
{
fprintf(console,"gpgkeys: unable to fetch %s: %s\n",request,errorbuffer);
ret=curl_err_to_gpg_err(res);
fprintf(console,"gpgkeys: %s fetch error %d: %s\n",opt->scheme,
res,errorbuffer);
fprintf(output,"\nKEY 0x%s FAILED %d\n",getkey,curl_err_to_gpg_err(res));
}
else if(!ctx.done)
{
fprintf(console,"gpgkeys: no key data found for %s\n",request);
ret=KEYSERVER_KEY_NOT_FOUND;
fprintf(output,"\nKEY 0x%s FAILED %d\n",getkey,KEYSERVER_KEY_NOT_FOUND);
}
if(ret)
fprintf(output,"\nKEY 0x%s FAILED %d\n",getkey,ret);
else
fprintf(output,"\nKEY 0x%s END\n",getkey);
return ret;
return curl_err_to_gpg_err(res);
}
static void

View File

@ -339,9 +339,9 @@ get_key (char *getkey)
fprintf (output,"KEY 0x%s END\n", getkey);
else
{
fprintf (console,"gpgkeys: key %s not found on keyserver\n",getkey);
fprintf (output,"KEY 0x%s FAILED %d\n",
getkey,KEYSERVER_KEY_NOT_FOUND);
fprintf(console,"gpgkeys: no key data found for finger:%s\n",
opt->opaque);
fprintf(output,"KEY 0x%s FAILED %d\n",getkey,KEYSERVER_KEY_NOT_FOUND);
}
xfree(line);