diff --git a/epan/dissectors/packet-isakmp.c b/epan/dissectors/packet-isakmp.c index 05d11ec957..8bb79ae607 100644 --- a/epan/dissectors/packet-isakmp.c +++ b/epan/dissectors/packet-isakmp.c @@ -54,9 +54,6 @@ #include #include #include -#if GCRYPT_VERSION_NUMBER >= 0x010600 -#define HAVE_LIBGCRYPT_AEAD 1 -#endif void proto_register_isakmp(void); void proto_reg_handoff_isakmp(void); diff --git a/epan/dissectors/packet-quic.c b/epan/dissectors/packet-quic.c index fa37525b77..a54bcac3e7 100644 --- a/epan/dissectors/packet-quic.c +++ b/epan/dissectors/packet-quic.c @@ -57,15 +57,6 @@ #include #include -#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ -/* Whether to provide support for authentication in addition to decryption. */ -#define HAVE_LIBGCRYPT_AEAD -#endif -#if GCRYPT_VERSION_NUMBER >= 0x010700 /* 1.7.0 */ -/* Whether ChaCh20 PNE can be supported. */ -#define HAVE_LIBGCRYPT_CHACHA20 -#endif - /* Prototypes */ void proto_reg_handoff_quic(void); void proto_register_quic(void); diff --git a/epan/dissectors/packet-quic.h b/epan/dissectors/packet-quic.h index 9a111fed7d..1802ec2329 100644 --- a/epan/dissectors/packet-quic.h +++ b/epan/dissectors/packet-quic.h @@ -16,6 +16,8 @@ extern "C" { #include "ws_symbol_export.h" +#include /* needed to define HAVE_LIBGCRYPT_AEAD */ + /** * Metadata for a STREAM frame. * https://tools.ietf.org/html/draft-ietf-quic-transport-23#section-19.8 diff --git a/epan/dissectors/packet-tls-utils.c b/epan/dissectors/packet-tls-utils.c index c00deb62bf..4a45959823 100644 --- a/epan/dissectors/packet-tls-utils.c +++ b/epan/dissectors/packet-tls-utils.c @@ -51,14 +51,6 @@ #if defined(HAVE_LIBGNUTLS) #include #endif -#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ -/* Whether to provide support for authentication in addition to decryption. */ -#define HAVE_LIBGCRYPT_AEAD -#endif -#if GCRYPT_VERSION_NUMBER >= 0x010700 /* 1.7.0 */ -/* Whether AEAD_CHACHA20_POLY1305 can be supported. */ -#define HAVE_LIBGCRYPT_CHACHA20_POLY1305 -#endif /* Lookup tables {{{ */ const value_string ssl_version_short_names[] = { diff --git a/epan/dissectors/packet-tls.c b/epan/dissectors/packet-tls.c index 0d92bc0b73..410b1074ca 100644 --- a/epan/dissectors/packet-tls.c +++ b/epan/dissectors/packet-tls.c @@ -71,14 +71,6 @@ #include "packet-tls.h" #include "packet-tls-utils.h" #include "packet-ber.h" -#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ -/* Whether to provide support for authentication in addition to decryption. */ -#define HAVE_LIBGCRYPT_AEAD -#endif -#if GCRYPT_VERSION_NUMBER >= 0x010700 /* 1.7.0 */ -/* Whether AEAD_CHACHA20_POLY1305 can be supported. */ -#define HAVE_LIBGCRYPT_CHACHA20_POLY1305 -#endif void proto_register_tls(void); diff --git a/ui/qt/CMakeLists.txt b/ui/qt/CMakeLists.txt index c7751bc87b..a159e0afe9 100644 --- a/ui/qt/CMakeLists.txt +++ b/ui/qt/CMakeLists.txt @@ -9,6 +9,10 @@ ADD_CUSTOM_CMAKE_INCLUDE() +include_directories( + ${GCRYPT_INCLUDE_DIRS} +) + set(WIRESHARK_WIDGET_HEADERS widgets/additional_toolbar.h widgets/apply_line_edit.h diff --git a/wsutil/wsgcrypt.h b/wsutil/wsgcrypt.h index e81dc73834..6099667780 100644 --- a/wsutil/wsgcrypt.h +++ b/wsutil/wsgcrypt.h @@ -25,6 +25,25 @@ DIAG_OFF(deprecated-declarations) DIAG_ON(deprecated-declarations) +/* + * Define HAVE_LIBGCRYPT_AEAD here, because it's used in several source + * files. + */ +#if GCRYPT_VERSION_NUMBER >= 0x010600 /* 1.6.0 */ +/* Whether to provide support for authentication in addition to decryption. */ +#define HAVE_LIBGCRYPT_AEAD +#endif + +/* + * Define some other "do we have?" items as well. + */ +#if GCRYPT_VERSION_NUMBER >= 0x010700 /* 1.7.0 */ +/* Whether ChaCh20 PNE can be supported. */ +#define HAVE_LIBGCRYPT_CHACHA20 +/* Whether AEAD_CHACHA20_POLY1305 can be supported. */ +#define HAVE_LIBGCRYPT_CHACHA20_POLY1305 +#endif + #define HASH_MD5_LENGTH 16 #define HASH_SHA1_LENGTH 20 #define HASH_SHA2_224_LENGTH 28