aboutsummaryrefslogtreecommitdiffstats
path: root/common/util.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2025-05-16 10:37:45 +0000
committerWerner Koch <[email protected]>2025-05-16 12:26:45 +0000
commit8e529f92219453195073d8a37670dbdf1f3a7e30 (patch)
tree4769d2644ead6fbe92b05e8e41fa8aba9cde9f82 /common/util.h
parentRevert "w32: On socket nonce mismatch close the socket." (diff)
downloadgnupg-8e529f92219453195073d8a37670dbdf1f3a7e30.tar.gz
gnupg-8e529f92219453195073d8a37670dbdf1f3a7e30.zip
gpg: Do not allow compressed key packets on import.
* g10/import.c (read_block): Bail out on compressed packets. * g10/options.h (COMPAT_COMPR_KEYS): New. * g10/gpg.c (compatibility_flags): Add "compr-keys". * common/util.h: Remove replacement code not any longer needed. (GPG_ERR_UNEXPECTED_PACKET): Add a new replacement code. -- Compressed key packets do not make much sense but historically they were supported. Thus we also add a compatibility flag. GnuPG-bug-id: 7014
Diffstat (limited to 'common/util.h')
-rw-r--r--common/util.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/common/util.h b/common/util.h
index acda2646e..4564009ce 100644
--- a/common/util.h
+++ b/common/util.h
@@ -39,12 +39,11 @@
* libgpg-error version. Define them here.
* Example: (#if GPG_ERROR_VERSION_NUMBER < 0x011500 // 1.21)
*/
-#if GPG_ERROR_VERSION_NUMBER < 0x012f00 /* 1.47 */
-# define GPG_ERR_BAD_PUK 320
-# define GPG_ERR_NO_RESET_CODE 321
-# define GPG_ERR_BAD_RESET_CODE 322
+#if GPGRT_VERSION_NUMBER < 0x013800 /* 1.56 */
+# define GPG_ERR_UNEXPECTED_PACKET 216
#endif
+
#ifndef EXTERN_UNLESS_MAIN_MODULE
# if !defined (INCLUDED_BY_MAIN_MODULE)
# define EXTERN_UNLESS_MAIN_MODULE extern