aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2022-08-19 17:23:14 -0700
committerGerald Combs <gerald@wireshark.org>2022-08-19 18:30:16 -0700
commit07c7ce6ad059da76d987c2dc1cc673a26a65656c (patch)
tree1f14180ebbafab114a96ca7b04fb781c1675da92
parent346c53b0b21cb959f468bc335a1ba36fcdf13106 (diff)
Windows: Upgrade libgcrypt to 1.10.1.
-rw-r--r--cmake/modules/FindGCRYPT.cmake11
-rw-r--r--epan/dissectors/packet-smb2.c26
-rw-r--r--epan/secrets.c4
-rw-r--r--tools/win-setup.ps12
4 files changed, 26 insertions, 17 deletions
diff --git a/cmake/modules/FindGCRYPT.cmake b/cmake/modules/FindGCRYPT.cmake
index eba5001b91..dc12485248 100644
--- a/cmake/modules/FindGCRYPT.cmake
+++ b/cmake/modules/FindGCRYPT.cmake
@@ -22,15 +22,18 @@ find_path(GCRYPT_INCLUDE_DIR gcrypt.h
"${GCRYPT_HINTS}/include"
)
+# libgcrypt-20 is used in libgcrypt-1.8.3-win??ws (from Debian).
+# libgcrypt is used in libgcrypt-1.10.1-2-win??ws (from Debian).
find_library(GCRYPT_LIBRARY
- NAMES gcrypt libgcrypt-20
- HINTS "${GCRYPT_HINTS}/bin")
+ NAMES gcrypt libgcrypt libgcrypt-20
+ HINTS "${GCRYPT_HINTS}/lib")
# libgpg-error6-0 is used in libgcrypt-1.7.6-win??ws (built from source).
# libgpg-error-0 is used in libgcrypt-1.8.3-win??ws (from Debian).
+# libgpg-error is used in libgcrypt-1.10.1-2-win??ws (from Debian).
find_library(GCRYPT_ERROR_LIBRARY
- NAMES gpg-error libgpg-error-0 libgpg-error6-0
- HINTS "${GCRYPT_HINTS}/bin")
+ NAMES gpg-error libgpg-error libgpg-error-0 libgpg-error6-0
+ HINTS "${GCRYPT_HINTS}/lib")
# Try to retrieve version from header if found (available since libgcrypt 1.3.0)
if(GCRYPT_INCLUDE_DIR)
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index c3690c0062..6d6daa9a4d 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -43,6 +43,20 @@
#include <wsutil/wsgcrypt.h>
#include <wsutil/ws_roundup.h>
+#ifdef _WIN32
+#include <windows.h>
+#else
+/* Defined in winnt.h */
+#define OWNER_SECURITY_INFORMATION 0x00000001
+#define GROUP_SECURITY_INFORMATION 0x00000002
+#define DACL_SECURITY_INFORMATION 0x00000004
+#define SACL_SECURITY_INFORMATION 0x00000008
+#define LABEL_SECURITY_INFORMATION 0x00000010
+#define ATTRIBUTE_SECURITY_INFORMATION 0x00000020
+#define SCOPE_SECURITY_INFORMATION 0x00000040
+#define BACKUP_SECURITY_INFORMATION 0x00010000
+#endif
+
//#define DEBUG_SMB2
#ifdef DEBUG_SMB2
#define DEBUG(...) g_ ## warning(__VA_ARGS__)
@@ -5539,18 +5553,6 @@ static const true_false_string tfs_additional_backup = {
"NOT requesting backup operation security information",
};
-#ifndef _MSC_VER
-/* Those macros are already defined by winnt.h for Windows build */
-#define OWNER_SECURITY_INFORMATION 0x00000001
-#define GROUP_SECURITY_INFORMATION 0x00000002
-#define DACL_SECURITY_INFORMATION 0x00000004
-#define SACL_SECURITY_INFORMATION 0x00000008
-#define LABEL_SECURITY_INFORMATION 0x00000010
-#define ATTRIBUTE_SECURITY_INFORMATION 0x00000020
-#define SCOPE_SECURITY_INFORMATION 0x00000040
-#define BACKUP_SECURITY_INFORMATION 0x00010000
-#endif
-
static int
dissect_additional_information_sec_mask(tvbuff_t *tvb, proto_tree *parent_tree, int offset)
{
diff --git a/epan/secrets.c b/epan/secrets.c
index 2776b23f06..9ebed0df76 100644
--- a/epan/secrets.c
+++ b/epan/secrets.c
@@ -30,6 +30,10 @@
# include <errno.h>
#endif /* HAVE_LIBGNUTLS */
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
/** Maps guint32 secrets_type -> secrets_block_callback_t. */
static GHashTable *secrets_callbacks;
diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1
index d51336a1f6..ffa28dc742 100644
--- a/tools/win-setup.ps1
+++ b/tools/win-setup.ps1
@@ -77,7 +77,7 @@ $Win64Archives = @{
"c-ares/c-ares-1.18.1-1-win64ws.zip" = "61183970996150e2eb137dfa7f5842ffa6e0eec2819634d5bdadc84013f8411d";
"gnutls/gnutls-3.6.3-1-win64ws.zip" = "994ac2578e7b4ca01e589ab2598927d53f7370bc3ff679f3006b0e6bb7a06df4";
"krb5/krb5-1.17-1-win64ws.zip" = "1f4a7ab86ae331ea9e58c9776a60def81ae9fe622882b2e8da2ad6ce6f6fb1d8";
- "libgcrypt/libgcrypt-1.8.3-win64ws.zip" = "53b1c636cb89de308ca4ea01b4990cf1deca7f6c2446189c7ff6e971137ffd76";
+ "libgcrypt/libgcrypt-1.10.1-2-win64ws.zip" = "61e1157f7623ef70e39ddf3aa6689ca581dc2ed14461515f149f83f11d0fb0a5";
"libilbc/libilbc-2.0.2-3-win64ws.zip" = "d7baeb98627c405bd7c3e41d6b07c4ea4f0f5db88436e566148320afd10cbb66";
"libmaxminddb/libmaxminddb-1.4.3-1-win64ws.zip" = "ee89944a19ab6e1c873bdecb9fc6205d317c41e6da6ec1d30bc892fddfd143da";
"libpcap/libpcap-1.10.1-1-win64ws.zip" = "59f8e0e90a3ab5671df561266ed2b02870a6f8f3a895b80c9db19fea9a12ffb2";