diff options
author | Werner Koch <[email protected]> | 2015-01-22 11:14:48 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-01-22 13:39:31 +0000 |
commit | 6f3d11d8837b00e3a1c4fa881066855c0321d6b2 (patch) | |
tree | 94da016d334f26bc36f3f8103dd56be6bd25455b /common/util.h | |
parent | gpg: Replace remaining old error code macros by GPG_ERR_. (diff) | |
download | gnupg-6f3d11d8837b00e3a1c4fa881066855c0321d6b2.tar.gz gnupg-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 <[email protected]>
Diffstat (limited to '')
-rw-r--r-- | common/util.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/common/util.h b/common/util.h index 94878bc36..24107f533 100644 --- a/common/util.h +++ b/common/util.h @@ -38,6 +38,7 @@ /* These error codes are used but not defined in the required libgpg-error version. Define them here. */ #if GPG_ERROR_VERSION_NUMBER < 0x011200 /* 1.18 */ +# define GPG_ERR_LEGACY_KEY 222 # define GPG_ERR_OBJ_TERM_STATE 225 # define GPG_ERR_FORBIDDEN 251 #endif |