summaryrefslogtreecommitdiffstats
path: root/g10/parse-packet.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2015-01-22 12:14:48 +0100
committerWerner Koch <wk@gnupg.org>2015-01-22 14:39:31 +0100
commit6f3d11d8837b00e3a1c4fa881066855c0321d6b2 (patch)
tree94da016d334f26bc36f3f8103dd56be6bd25455b /g10/parse-packet.c
parentgpg: Replace remaining old error code macros by GPG_ERR_. (diff)
downloadgnupg2-6f3d11d8837b00e3a1c4fa881066855c0321d6b2.tar.xz
gnupg2-6f3d11d8837b00e3a1c4fa881066855c0321d6b2.zip
gpg: Add dedicated error code for PGP-2 keys.
* g10/parse-packet.c (parse_key): Return GPG_ERR_LEGACY_KEY for PGP2 keys. * g10/import.c (read_block): Simplify by checking GPG_ERR_LEGACY_KEY. * g10/getkey.c (lookup): Silence error message for PGP-2 keys. * common/util.h (GPG_ERR_LEGACY_KEY): Add replacement for older libgpg-error. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to '')
-rw-r--r--g10/parse-packet.c2
1 files changed, 1 insertions, 1 deletions
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