diff --git a/capinfos.c b/capinfos.c index da576f88c5..eab2677bcb 100644 --- a/capinfos.c +++ b/capinfos.c @@ -75,7 +75,7 @@ #include #include -#include +#include #include "ui/failure_message.h" diff --git a/doc/README.developer b/doc/README.developer index 317dfbaaca..69b0e8c32c 100644 --- a/doc/README.developer +++ b/doc/README.developer @@ -452,9 +452,9 @@ a MinGW toolchain, including MinGW-w64. The same concern applies to CMake code. Depending on the particular situation you may need to use if(WIN32) or if(MSVC) or if(MINGW). -Wireshark uses Libgcrypt as general-purpose crypto library. To use it from -your dissector, do not include gcrypt.h directly, but use the wrapper file -wsutil/wsgcrypt.h instead. +Wireshark uses Libgcrypt as general-purpose crypto library. Some Wireshark +specific extensions are defined in wsutil/wsgcrypt.h. You might want to +include that file instead. 2. String handling diff --git a/editcap.c b/editcap.c index 9a2d799cb0..e558896993 100644 --- a/editcap.c +++ b/editcap.c @@ -27,6 +27,7 @@ #include #include +#include #ifdef HAVE_UNISTD_H #include @@ -50,7 +51,6 @@ #include #include #include -#include #include #include #include diff --git a/epan/epan.c b/epan/epan.c index 3ab549e7ad..0a95ed64e6 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -8,10 +8,11 @@ */ #include "config.h" +#include "epan.h" #include -#include +#include #ifdef HAVE_LIBGNUTLS #include @@ -23,7 +24,6 @@ #include -#include "epan.h" #include "epan/frame_data.h" #include "dfilter/dfilter.h" diff --git a/epan/epan.h b/epan/epan.h index 4e2badc252..c822e805cc 100644 --- a/epan/epan.h +++ b/epan/epan.h @@ -10,7 +10,7 @@ #ifndef __EPAN_H__ #define __EPAN_H__ -#include +#include #include #include @@ -18,7 +18,6 @@ #include #include #include -#include "ws_symbol_export.h" #ifdef __cplusplus extern "C" { diff --git a/epan/secrets.c b/epan/secrets.c index 9ebed0df76..0bca2eb20d 100644 --- a/epan/secrets.c +++ b/epan/secrets.c @@ -22,7 +22,7 @@ #ifdef HAVE_LIBGNUTLS # include # include -# include +# include # include # include # include diff --git a/tools/checkAPIs.pl b/tools/checkAPIs.pl index d943338876..f43d5dbd46 100755 --- a/tools/checkAPIs.pl +++ b/tools/checkAPIs.pl @@ -534,19 +534,6 @@ sub check_included_files($$) @incFiles = (${$fileContentsRef} =~ m/\#include \s* ([<"].+[>"])/gox); - # only our wrapper file wsutils/wsgcrypt.h may include gcrypt.h - # all other files should include the wrapper - if ($filename !~ /wsgcrypt\.h/) { - foreach (@incFiles) { - if ( m#([<"]|/+)gcrypt\.h[>"]$# ) { - print STDERR "Warning: ".$filename. - " includes gcrypt.h directly. ". - "Include wsutil/wsgcrypt.h instead.\n"; - last; - } - } - } - # files in the ui/qt directory should include the ui class includes # by using #include <> # this ensures that Visual Studio picks up these files from the diff --git a/ui/summary.c b/ui/summary.c index fedaefea86..127698fd5c 100644 --- a/ui/summary.c +++ b/ui/summary.c @@ -15,7 +15,7 @@ #include #include -#include +#include #include "cfile.h" #include "ui/summary.h" diff --git a/wsutil/curve25519.c b/wsutil/curve25519.c index bf80c58635..d40c0cfae8 100644 --- a/wsutil/curve25519.c +++ b/wsutil/curve25519.c @@ -11,7 +11,7 @@ */ #include "curve25519.h" -#include "ws_attributes.h" +#include static inline void copy_and_reverse(unsigned char *dest, const unsigned char *src, size_t n) diff --git a/wsutil/curve25519.h b/wsutil/curve25519.h index b2599d19c7..1eda0200c8 100644 --- a/wsutil/curve25519.h +++ b/wsutil/curve25519.h @@ -13,8 +13,7 @@ #ifndef __CURVE25519_H__ #define __CURVE25519_H__ -#include "ws_symbol_export.h" -#include "wsgcrypt.h" +#include /* * Computes Q = X25519(n, P). In other words, given the secret key n, the public diff --git a/wsutil/eax.c b/wsutil/eax.c index 35784c5f88..d1d94c6236 100644 --- a/wsutil/eax.c +++ b/wsutil/eax.c @@ -9,11 +9,11 @@ * SPDX-License-Identifier: GPL-2.0-or-later */ #include "config.h" +#include "eax.h" #include #include /* Use libgcrypt for cipher libraries. */ -#include -#include "eax.h" +#include typedef struct { guint8 L[EAX_SIZEOF_KEY]; diff --git a/wsutil/eax.h b/wsutil/eax.h index 252b81208d..16df8fbc7b 100644 --- a/wsutil/eax.h +++ b/wsutil/eax.h @@ -12,8 +12,7 @@ #ifndef _EAX_H #define _EAX_H -#include -#include "ws_symbol_export.h" +#include typedef struct tagMAC_T { diff --git a/wsutil/rsa.h b/wsutil/rsa.h index 8d51c4b2ba..fc2e0f73f5 100644 --- a/wsutil/rsa.h +++ b/wsutil/rsa.h @@ -12,8 +12,8 @@ #ifndef __RSA_H__ #define __RSA_H__ -#include "ws_symbol_export.h" -#include "wsgcrypt.h" +#include +#include #ifdef HAVE_LIBGNUTLS #include diff --git a/wsutil/wsgcrypt.h b/wsutil/wsgcrypt.h index 78eec90494..77d57c57ea 100644 --- a/wsutil/wsgcrypt.h +++ b/wsutil/wsgcrypt.h @@ -16,16 +16,8 @@ #define __WSGCRYPT_H__ #include - -/* XXX: Turning off warnings here may not be necessary now that libgcrypt - * 1.8.0 is the minimum version. - */ -DIAG_OFF(deprecated-declarations) - #include -DIAG_ON(deprecated-declarations) - #define HASH_MD5_LENGTH 16 #define HASH_SHA1_LENGTH 20 #define HASH_SHA2_224_LENGTH 28