mirror of
git://git.gnupg.org/gnupg.git
synced 2024-10-30 19:58:44 +01:00
gpg: Don't bail out for unknown subkey packet versions.
* g10/import.c (read_block): Don't show a warning for unbnown version
also for non-primary-key packets.
* g10/parse-packet.c (parse_key): Use log_info for unsupported v5
packets.
--
This fixes the problem that 2.2 can't import keys with a v5 subkey.
This fix allows a gnupg 2.6. version to export a key with an
additional PQC subkey and 2.2 can still import the other subkeys.
The second patch avoids that gpg returns with an error code.
Updates-commit: de70a2f377
This commit is contained in:
parent
95468f531c
commit
b357ff2aa6
@ -959,7 +959,8 @@ read_block( IOBUF a, unsigned int options,
|
||||
else if (rc ) /* (ignore errors) */
|
||||
{
|
||||
skip_sigs = 0;
|
||||
if (gpg_err_code (rc) == GPG_ERR_UNKNOWN_PACKET)
|
||||
if (gpg_err_code (rc) == GPG_ERR_UNKNOWN_PACKET
|
||||
|| gpg_err_code (rc) == GPG_ERR_UNKNOWN_VERSION)
|
||||
; /* Do not show a diagnostic. */
|
||||
else if (gpg_err_code (rc) == GPG_ERR_INV_PACKET
|
||||
&& (pkt->pkttype == PKT_USER_ID
|
||||
|
@ -2474,7 +2474,10 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
|
||||
}
|
||||
else
|
||||
{
|
||||
log_error ("packet(%d) with unknown version %d\n", pkttype, version);
|
||||
if (version == 5)
|
||||
log_info ("packet(%d) with unsupported version %d\n", pkttype, version);
|
||||
else
|
||||
log_error ("packet(%d) with unsupported version %d\n", pkttype,version);
|
||||
if (list_mode)
|
||||
es_fputs (":key packet: [unknown version]\n", listfp);
|
||||
err = gpg_error (GPG_ERR_UNKNOWN_VERSION);
|
||||
|
Loading…
Reference in New Issue
Block a user