diff options
Diffstat (limited to 'g10/import.c')
-rw-r--r-- | g10/import.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/import.c b/g10/import.c index b8148d48d..eb3063dd3 100644 --- a/g10/import.c +++ b/g10/import.c @@ -860,12 +860,14 @@ read_block( IOBUF a, int with_meta, skip_sigs = 0; while ((rc=parse_packet (&parsectx, pkt)) != -1) { - if (rc && (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY + if (rc && ((gpg_err_code (rc) == GPG_ERR_LEGACY_KEY + || gpg_err_code (rc) == GPG_ERR_UNKNOWN_VERSION) && (pkt->pkttype == PKT_PUBLIC_KEY || pkt->pkttype == PKT_SECRET_KEY))) { in_v3key = 1; - ++*r_v3keys; + if (gpg_err_code (rc) != GPG_ERR_UNKNOWN_VERSION) + ++*r_v3keys; free_packet (pkt, &parsectx); init_packet (pkt); continue; |