mirror of
git://git.gnupg.org/gnupg.git
synced 2025-04-17 15:44:34 +02:00
gpg: Use more specific reason codes for INV_RECP.
* g10/pkclist.c (build_pk_list): Use more specific reasons codes for INV_RECP. -- GnuPG-bug-id: 1650 Note that this patch is a bit more limited than the one in 2.1.
This commit is contained in:
parent
9607bc0b9f
commit
76b0b076d0
@ -831,7 +831,11 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||||||
{
|
{
|
||||||
free_public_key ( pk ); pk = NULL;
|
free_public_key ( pk ); pk = NULL;
|
||||||
log_error (_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
log_error (_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
||||||
write_status_text_and_buffer (STATUS_INV_RECP, "0 ",
|
write_status_text_and_buffer (STATUS_INV_RECP,
|
||||||
|
(rc == GPG_ERR_NO_PUBKEY
|
||||||
|
|| rc == GPG_ERR_NO_SECKEY)? "1 ":
|
||||||
|
(rc == GPG_ERR_INV_USER_ID)? "14 ":
|
||||||
|
"0 ",
|
||||||
rov->d, strlen (rov->d), -1);
|
rov->d, strlen (rov->d), -1);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -874,7 +878,7 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||||||
available. */
|
available. */
|
||||||
free_public_key( pk ); pk = NULL;
|
free_public_key( pk ); pk = NULL;
|
||||||
log_error(_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
log_error(_("%s: skipped: %s\n"), rov->d, g10_errstr(rc) );
|
||||||
write_status_text_and_buffer (STATUS_INV_RECP, "0 ",
|
write_status_text_and_buffer (STATUS_INV_RECP, "3 ",
|
||||||
rov->d, strlen (rov->d), -1);
|
rov->d, strlen (rov->d), -1);
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
@ -1086,7 +1090,11 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||||||
/* Key not found or other error. */
|
/* Key not found or other error. */
|
||||||
free_public_key( pk ); pk = NULL;
|
free_public_key( pk ); pk = NULL;
|
||||||
log_error(_("%s: skipped: %s\n"), remusr->d, g10_errstr(rc) );
|
log_error(_("%s: skipped: %s\n"), remusr->d, g10_errstr(rc) );
|
||||||
write_status_text_and_buffer (STATUS_INV_RECP, "0 ",
|
write_status_text_and_buffer (STATUS_INV_RECP,
|
||||||
|
(rc == G10ERR_NO_PUBKEY
|
||||||
|
|| rc == G10ERR_NO_SECKEY)? "1 ":
|
||||||
|
(rc == G10ERR_INV_USER_ID)? "14 ":
|
||||||
|
"0 ",
|
||||||
remusr->d, strlen (remusr->d),
|
remusr->d, strlen (remusr->d),
|
||||||
-1);
|
-1);
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -1103,7 +1111,7 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||||||
free_public_key(pk); pk = NULL;
|
free_public_key(pk); pk = NULL;
|
||||||
log_info(_("%s: skipped: public key is disabled\n"),
|
log_info(_("%s: skipped: public key is disabled\n"),
|
||||||
remusr->d);
|
remusr->d);
|
||||||
write_status_text_and_buffer (STATUS_INV_RECP, "0 ",
|
write_status_text_and_buffer (STATUS_INV_RECP, "13 ",
|
||||||
remusr->d,
|
remusr->d,
|
||||||
strlen (remusr->d),
|
strlen (remusr->d),
|
||||||
-1);
|
-1);
|
||||||
@ -1152,7 +1160,7 @@ build_pk_list( strlist_t rcpts, PK_LIST *ret_pk_list, unsigned int use )
|
|||||||
{
|
{
|
||||||
/* Key found but not usable for us (e.g. sign-only key). */
|
/* Key found but not usable for us (e.g. sign-only key). */
|
||||||
free_public_key( pk ); pk = NULL;
|
free_public_key( pk ); pk = NULL;
|
||||||
write_status_text_and_buffer (STATUS_INV_RECP, "0 ",
|
write_status_text_and_buffer (STATUS_INV_RECP, "3 ",
|
||||||
remusr->d,
|
remusr->d,
|
||||||
strlen (remusr->d),
|
strlen (remusr->d),
|
||||||
-1);
|
-1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user