diff options
author | Werner Koch <[email protected]> | 2019-03-18 13:10:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2019-03-18 13:10:16 +0000 |
commit | de70a2f377c1647417fb8a2b6476c3744a901296 (patch) | |
tree | fd6ee4316ba93ee3c31f016b01e00c97c0b086fd /g10/parse-packet.c | |
parent | gpg: Allow import of PGP desktop exported secret keys. (diff) | |
download | gnupg-de70a2f377c1647417fb8a2b6476c3744a901296.tar.gz gnupg-de70a2f377c1647417fb8a2b6476c3744a901296.zip |
gpg: Do not bail out on v5 keys in the local keyring.
* g10/parse-packet.c (parse_key): Return GPG_ERR_UNKNOWN_VERSION
instead of invalid packet.
* g10/keydb.c (parse_keyblock_image): Do not map the unknown version
error to invalid keyring.
(keydb_search): Skip unknown version errors simlar to legacy keys.
* g10/keyring.c (keyring_rebuild_cache): Skip keys with unknown
versions.
* g10/import.c (read_block): Handle unknown version.
--
When using gpg 2.3 the local keyring may contain v5 keys. This patch
allows the use of such a keyring also with a 2.2 version which does
not support v5 keys. We will probably need some more tweaking here
but this covers the most common cases of listing keys and also
importing v5 keys.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/parse-packet.c')
-rw-r--r-- | g10/parse-packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/parse-packet.c b/g10/parse-packet.c index ff348ec69..05f63e928 100644 --- a/g10/parse-packet.c +++ b/g10/parse-packet.c @@ -2296,7 +2296,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen, log_error ("packet(%d) with unknown version %d\n", pkttype, version); if (list_mode) es_fputs (":key packet: [unknown version]\n", listfp); - err = gpg_error (GPG_ERR_INV_PACKET); + err = gpg_error (GPG_ERR_UNKNOWN_VERSION); goto leave; } |