diff options
author | Werner Koch <wk@gnupg.org> | 2018-02-22 14:23:01 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2018-02-22 14:23:01 +0100 |
commit | b375d50ee4ce52c9b0f0855ec155be027642fb05 (patch) | |
tree | f3e0d600229ca7dbbbd7216d62ecf48d6cb73dc1 | |
parent | g10: Select a secret key by checking availability under gpg-agent. (diff) | |
download | gnupg2-b375d50ee4ce52c9b0f0855ec155be027642fb05.tar.xz gnupg2-b375d50ee4ce52c9b0f0855ec155be027642fb05.zip |
gpg: Don't let gpg return failure on an invalid packet in a keyblock.
* g10/keydb.c (parse_keyblock_image): Use log_info instead of
log_error for skipped packets.
* g10/keyring.c (keyring_get_keyblock): Ditto.
--
log_info should be sufficient and makes this more robust. Some
tools (e.g. Enigmail) are too picky on return codes from gpg.
Signed-off-by: Werner Koch <wk@gnupg.org>
-rw-r--r-- | g10/keydb.c | 5 | ||||
-rw-r--r-- | g10/keyring.c | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/g10/keydb.c b/g10/keydb.c index 58a14a83d..03fadfd54 100644 --- a/g10/keydb.c +++ b/g10/keydb.c @@ -1269,10 +1269,7 @@ parse_keyblock_image (iobuf_t iobuf, int pk_no, int uid_no, break; /* Allowed per RFC. */ default: - /* Note that can't allow ring trust packets here and some of - the other GPG specific packets don't make sense either. */ - log_error ("skipped packet of type %d in keybox\n", - (int)pkt->pkttype); + log_info ("skipped packet of type %d in keybox\n", (int)pkt->pkttype); free_packet(pkt, &parsectx); init_packet(pkt); continue; diff --git a/g10/keyring.c b/g10/keyring.c index 50f1b824c..25ef50747 100644 --- a/g10/keyring.c +++ b/g10/keyring.c @@ -459,8 +459,8 @@ keyring_get_keyblock (KEYRING_HANDLE hd, KBNODE *ret_kb) break; /* Allowed by us. */ default: - log_error ("skipped packet of type %d in keyring\n", - (int)pkt->pkttype); + log_info ("skipped packet of type %d in keyring\n", + (int)pkt->pkttype); free_packet(pkt, &parsectx); init_packet(pkt); continue; |