aboutsummaryrefslogtreecommitdiffstats
path: root/wsutil
diff options
context:
space:
mode:
authorGuy Harris <gharris@sonic.net>2020-08-10 14:33:03 -0700
committerGuy Harris <gharris@sonic.net>2020-08-11 02:30:04 +0000
commitd5fe2d494c6475263b954a36812b888b11e1a50b (patch)
tree67b770e73139a9d9d78e0d413f250069ddea02f6 /wsutil
parent151ee605559ac0d61eb8618a75985772c57dbfa8 (diff)
wsutil: define HAVE_LIBGCRYPT_AEAD in wsutil/wsgcrypt.h.
It's used in a number of source files; don't force each of them to test GCRYPT_VERSION_NUMBER independently. Make sure every file that uses HAVE_LIBGCRYPT_AEAD includes wsutil/wsgcrypt.h. Also do some other definitions that are based on the libgcrypt version there as well. This requires that the Qt UI code be given the include directory for libgcrypt, as the follow stream code includes epan/dissectors/packet-quic.h, which includes wsutil/wsgcrypt.h to get HAVE_LIBGCRYPT_AEAD defined, and wsutil/wsgcrypt.h includes <gcrypt.h>. Change-Id: I9cb50f411f5b2b6b9e28a38bfd901f4a66d9cc8f Reviewed-on: https://code.wireshark.org/review/38116 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Guy Harris <gharris@sonic.net>
Diffstat (limited to 'wsutil')
-rw-r--r--wsutil/wsgcrypt.h19
1 files changed, 19 insertions, 0 deletions
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