gpg: Add dedicated error code for PGP-2 keys.
authorWerner Koch <wk@gnupg.org>
Thu, 22 Jan 2015 11:14:48 +0000 (12:14 +0100)
committerWerner Koch <wk@gnupg.org>
Thu, 22 Jan 2015 13:39:31 +0000 (14:39 +0100)
commit6f3d11d8837b00e3a1c4fa881066855c0321d6b2
tree94da016d334f26bc36f3f8103dd56be6bd25455b
parent11142e0ad7bc9a9e3c3dccf958d8dbd3312cb993
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>
common/util.h
g10/getkey.c
g10/import.c
g10/keyring.c
g10/parse-packet.c