summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kaiser <wireshark@kaiser.cx>2015-10-30 17:45:53 +0100
committerAnders Broman <a.broman58@gmail.com>2015-11-02 11:42:00 +0000
commit1c5b3c378321267e86aa4154c3d907a1088f6949 (patch)
tree70cc947e516e6da857c4fa6129cd959a46b210e0
parent7f10520d0442a51fc9747d702b144592b4915964 (diff)
downloadwireshark-1c5b3c378321267e86aa4154c3d907a1088f6949.tar.gz
wsgcrypt.h checks internally if we HAVE_LIBGCRYPT
we can #include <wsutils/wsgcrypt.h> without doing the check ourselves Change-Id: I248431bdb6cfa1bd85b794ec04ce1e4fcd3a7d2d Reviewed-on: https://code.wireshark.org/review/11483 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--asn1/pkcs12/packet-pkcs12-template.c2
-rw-r--r--asn1/snmp/packet-snmp-template.c2
-rw-r--r--epan/dissectors/packet-dvbci.c3
-rw-r--r--epan/dissectors/packet-ieee802154.c2
-rw-r--r--epan/dissectors/packet-lwm.c3
-rw-r--r--epan/dissectors/packet-pdcp-lte.c3
-rw-r--r--epan/dissectors/packet-pkcs12.c14
-rw-r--r--epan/dissectors/packet-smb2.c3
-rw-r--r--epan/dissectors/packet-snmp.c12
-rw-r--r--epan/dissectors/packet-zbee-security.c2
-rw-r--r--epan/epan.c2
11 files changed, 11 insertions, 37 deletions
diff --git a/asn1/pkcs12/packet-pkcs12-template.c b/asn1/pkcs12/packet-pkcs12-template.c
index d6a80dc586..bcdd6202a0 100644
--- a/asn1/pkcs12/packet-pkcs12-template.c
+++ b/asn1/pkcs12/packet-pkcs12-template.c
@@ -39,9 +39,7 @@
#include "packet-x509if.h"
#include "packet-cms.h"
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
#define PNAME "PKCS#12: Personal Information Exchange"
#define PSNAME "PKCS12"
diff --git a/asn1/snmp/packet-snmp-template.c b/asn1/snmp/packet-snmp-template.c
index c0b97d7856..a94dffdf35 100644
--- a/asn1/snmp/packet-snmp-template.c
+++ b/asn1/snmp/packet-snmp-template.c
@@ -67,9 +67,7 @@
#include "packet-ber.h"
#include "packet-snmp.h"
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
/* Take a pointer that may be null and return a pointer that's not null
by turning null pointers into pointers to the above null string,
diff --git a/epan/dissectors/packet-dvbci.c b/epan/dissectors/packet-dvbci.c
index 4360e4c2d4..c64ecb44f6 100644
--- a/epan/dissectors/packet-dvbci.c
+++ b/epan/dissectors/packet-dvbci.c
@@ -48,10 +48,7 @@
#include "packet-x509af.h"
#include "packet-x509ce.h"
#include "packet-ber.h"
-
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
void proto_register_dvbci(void);
void proto_reg_handoff_dvbci(void);
diff --git a/epan/dissectors/packet-ieee802154.c b/epan/dissectors/packet-ieee802154.c
index 361948b8f0..7dcaa95b7e 100644
--- a/epan/dissectors/packet-ieee802154.c
+++ b/epan/dissectors/packet-ieee802154.c
@@ -75,9 +75,7 @@
#include <wsutil/pint.h>
/* Use libgcrypt for cipher libraries. */
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
#include "packet-ieee802154.h"
#include "packet-sll.h"
diff --git a/epan/dissectors/packet-lwm.c b/epan/dissectors/packet-lwm.c
index d3a56bec34..cc2922bd8a 100644
--- a/epan/dissectors/packet-lwm.c
+++ b/epan/dissectors/packet-lwm.c
@@ -31,10 +31,7 @@
#include "packet-ieee802154.h"
#include <epan/prefs.h>
#include <epan/strutil.h>
-
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
/*LwMesh lengths*/
#define LWM_HEADER_BASE_LEN 7
diff --git a/epan/dissectors/packet-pdcp-lte.c b/epan/dissectors/packet-pdcp-lte.c
index f44efb1502..0f4313b729 100644
--- a/epan/dissectors/packet-pdcp-lte.c
+++ b/epan/dissectors/packet-pdcp-lte.c
@@ -29,10 +29,7 @@
#include <epan/prefs.h>
#include <epan/expert.h>
#include <epan/uat.h>
-
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
/* Define this symbol if you have a working implementation of SNOW3G f8() and f9() available.
Note that the use of this algorithm is restricted, and that an administrative charge
diff --git a/epan/dissectors/packet-pkcs12.c b/epan/dissectors/packet-pkcs12.c
index 1d98461022..78af685fd7 100644
--- a/epan/dissectors/packet-pkcs12.c
+++ b/epan/dissectors/packet-pkcs12.c
@@ -47,9 +47,7 @@
#include "packet-x509if.h"
#include "packet-cms.h"
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
#define PNAME "PKCS#12: Personal Information Exchange"
#define PSNAME "PKCS12"
@@ -140,7 +138,7 @@ static int hf_pkcs12_encryptionScheme = -1; /* AlgorithmIdentifier */
static int hf_pkcs12_messageAuthScheme = -1; /* AlgorithmIdentifier */
/*--- End of included file: packet-pkcs12-hf.c ---*/
-#line 78 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 76 "../../asn1/pkcs12/packet-pkcs12-template.c"
/* Initialize the subtree pointers */
@@ -168,7 +166,7 @@ static gint ett_pkcs12_PBES2Params = -1;
static gint ett_pkcs12_PBMAC1Params = -1;
/*--- End of included file: packet-pkcs12-ett.c ---*/
-#line 81 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 79 "../../asn1/pkcs12/packet-pkcs12-template.c"
static void append_oid(proto_tree *tree, const char *oid)
{
@@ -1152,7 +1150,7 @@ static int dissect_PBMAC1Params_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, p
/*--- End of included file: packet-pkcs12-fn.c ---*/
-#line 389 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 387 "../../asn1/pkcs12/packet-pkcs12-template.c"
static int strip_octet_string(tvbuff_t *tvb)
{
@@ -1441,7 +1439,7 @@ void proto_register_pkcs12(void) {
"AlgorithmIdentifier", HFILL }},
/*--- End of included file: packet-pkcs12-hfarr.c ---*/
-#line 461 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 459 "../../asn1/pkcs12/packet-pkcs12-template.c"
};
/* List of subtrees */
@@ -1472,7 +1470,7 @@ void proto_register_pkcs12(void) {
&ett_pkcs12_PBMAC1Params,
/*--- End of included file: packet-pkcs12-ettarr.c ---*/
-#line 467 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 465 "../../asn1/pkcs12/packet-pkcs12-template.c"
};
static ei_register_info ei[] = {
{ &ei_pkcs12_octet_string_expected, { "pkcs12.octet_string_expected", PI_PROTOCOL, PI_WARN, "BER Error: OCTET STRING expected", EXPFILL }},
@@ -1540,7 +1538,7 @@ void proto_reg_handoff_pkcs12(void) {
/*--- End of included file: packet-pkcs12-dis-tab.c ---*/
-#line 506 "../../asn1/pkcs12/packet-pkcs12-template.c"
+#line 504 "../../asn1/pkcs12/packet-pkcs12-template.c"
register_ber_oid_dissector("1.2.840.113549.1.9.22.1", dissect_X509Certificate_OCTETSTRING_PDU, proto_pkcs12, "x509Certificate");
diff --git a/epan/dissectors/packet-smb2.c b/epan/dissectors/packet-smb2.c
index 61ec7d3899..610d560cad 100644
--- a/epan/dissectors/packet-smb2.c
+++ b/epan/dissectors/packet-smb2.c
@@ -47,10 +47,7 @@
#include "packet-smb-common.h"
#include "packet-dcerpc-nt.h"
-/* Use libgcrypt for cipher libraries. */
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
#define NT_STATUS_PENDING 0x00000103
diff --git a/epan/dissectors/packet-snmp.c b/epan/dissectors/packet-snmp.c
index 24f904ff9e..6a258641bf 100644
--- a/epan/dissectors/packet-snmp.c
+++ b/epan/dissectors/packet-snmp.c
@@ -75,9 +75,7 @@
#include "packet-ber.h"
#include "packet-snmp.h"
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif
/* Take a pointer that may be null and return a pointer that's not null
by turning null pointers into pointers to the above null string,
@@ -302,7 +300,7 @@ static int hf_snmp_priority = -1; /* INTEGER_M1_2147483647 */
static int hf_snmp_operation = -1; /* T_operation */
/*--- End of included file: packet-snmp-hf.c ---*/
-#line 228 "../../asn1/snmp/packet-snmp-template.c"
+#line 226 "../../asn1/snmp/packet-snmp-template.c"
/* Initialize the subtree pointers */
static gint ett_smux = -1;
@@ -342,7 +340,7 @@ static gint ett_snmp_SimpleOpen_U = -1;
static gint ett_snmp_RReqPDU_U = -1;
/*--- End of included file: packet-snmp-ett.c ---*/
-#line 244 "../../asn1/snmp/packet-snmp-template.c"
+#line 242 "../../asn1/snmp/packet-snmp-template.c"
static expert_field ei_snmp_failed_decrypted_data_pdu = EI_INIT;
static expert_field ei_snmp_decrypted_data_bad_formatted = EI_INIT;
@@ -3087,7 +3085,7 @@ static int dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, prot
/*--- End of included file: packet-snmp-fn.c ---*/
-#line 1875 "../../asn1/snmp/packet-snmp-template.c"
+#line 1873 "../../asn1/snmp/packet-snmp-template.c"
guint
@@ -3909,7 +3907,7 @@ void proto_register_snmp(void) {
NULL, HFILL }},
/*--- End of included file: packet-snmp-hfarr.c ---*/
-#line 2432 "../../asn1/snmp/packet-snmp-template.c"
+#line 2430 "../../asn1/snmp/packet-snmp-template.c"
};
/* List of subtrees */
@@ -3949,7 +3947,7 @@ void proto_register_snmp(void) {
&ett_snmp_RReqPDU_U,
/*--- End of included file: packet-snmp-ettarr.c ---*/
-#line 2448 "../../asn1/snmp/packet-snmp-template.c"
+#line 2446 "../../asn1/snmp/packet-snmp-template.c"
};
static ei_register_info ei[] = {
{ &ei_snmp_failed_decrypted_data_pdu, { "snmp.failed_decrypted_data_pdu", PI_MALFORMED, PI_WARN, "Failed to decrypt encryptedPDU", EXPFILL }},
diff --git a/epan/dissectors/packet-zbee-security.c b/epan/dissectors/packet-zbee-security.c
index 76958adb52..86d4a3e5b7 100644
--- a/epan/dissectors/packet-zbee-security.c
+++ b/epan/dissectors/packet-zbee-security.c
@@ -36,9 +36,7 @@
/* We require libgcrpyt in order to decrypt ZigBee packets. Without it the best
* we can do is parse the security header and give up.
*/
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
#include "packet-ieee802154.h"
#include "packet-zbee.h"
diff --git a/epan/epan.c b/epan/epan.c
index b548319155..b2a1f5d4f6 100644
--- a/epan/epan.c
+++ b/epan/epan.c
@@ -23,9 +23,7 @@
#include <stdarg.h>
-#ifdef HAVE_LIBGCRYPT
#include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
#ifdef HAVE_LIBGNUTLS
#include <gnutls/gnutls.h>