aboutsummaryrefslogtreecommitdiffstats
path: root/g10
diff options
context:
space:
mode:
Diffstat (limited to 'g10')
-rw-r--r--g10/getkey.c5
-rw-r--r--g10/import.c6
-rw-r--r--g10/keyring.c4
-rw-r--r--g10/parse-packet.c2
4 files changed, 6 insertions, 11 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index d240dd7d1..62d2d3306 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -403,8 +403,6 @@ get_pubkey (PKT_public_key * pk, u32 * keyid)
if (!rc)
goto leave;
- log_debug ("looking up key %08X%08X failed: %s\n", keyid[0], keyid[1],
- gpg_strerror (rc));
rc = GPG_ERR_NO_PUBKEY;
leave:
@@ -2573,7 +2571,8 @@ lookup (getkey_ctx_t ctx, kbnode_t *ret_keyblock, int want_secret)
}
found:
- if (rc && gpg_err_code (rc) != GPG_ERR_NOT_FOUND)
+ if (rc && gpg_err_code (rc) != GPG_ERR_NOT_FOUND
+ && gpg_err_code (rc) != GPG_ERR_LEGACY_KEY)
log_error ("keydb_search failed: %s\n", gpg_strerror (rc));
if (!rc)
diff --git a/g10/import.c b/g10/import.c
index 56121dbb1..de2252069 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -544,11 +544,9 @@ read_block( IOBUF a, PACKET **pending_pkt, kbnode_t *ret_root, int *r_v3keys)
in_v3key = 0;
while ((rc=parse_packet(a, pkt)) != -1)
{
- if (rc && (gpg_err_code (rc) == GPG_ERR_INV_PACKET
+ if (rc && (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY
&& (pkt->pkttype == PKT_PUBLIC_KEY
- || pkt->pkttype == PKT_SECRET_KEY)
- && (pkt->pkt.public_key->version == 2
- || pkt->pkt.public_key->version == 3)))
+ || pkt->pkttype == PKT_SECRET_KEY)))
{
in_v3key = 1;
++*r_v3keys;
diff --git a/g10/keyring.c b/g10/keyring.c
index 7ac3478ad..34829e711 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -350,7 +350,7 @@ keyring_lock (KEYRING_HANDLE hd, int yes)
/*
- * Return the last found keyring. Caller must free it.
+ * Return the last found keyblock. Caller must free it.
* The returned keyblock has the kbode flag bit 0 set for the node with
* the public key used to locate the keyblock or flag bit 1 set for
* the user ID node.
@@ -1409,8 +1409,6 @@ keyring_rebuild_cache (void *token,int noisy)
goto leave;
}
- log_debug ("keblock with version %d\n",
- keyblock->pkt->pkt.public_key->version);
if (keyblock->pkt->pkt.public_key->version < 4)
{
/* We do not copy/cache v3 keys or any other unknown
diff --git a/g10/parse-packet.c b/g10/parse-packet.c
index ae215c413..73c4434c1 100644
--- a/g10/parse-packet.c
+++ b/g10/parse-packet.c
@@ -1963,7 +1963,7 @@ parse_key (IOBUF inp, int pkttype, unsigned long pktlen,
if (list_mode)
es_fprintf (listfp, ":key packet: [obsolete version %d]\n", version);
pk->version = version;
- err = gpg_error (GPG_ERR_INV_PACKET);
+ err = gpg_error (GPG_ERR_LEGACY_KEY);
goto leave;
}
else