wsgcrypt.h checks internally if we HAVE_LIBGCRYPT
authorMartin Kaiser <wireshark@kaiser.cx>
Fri, 30 Oct 2015 16:45:53 +0000 (17:45 +0100)
committerAnders Broman <a.broman58@gmail.com>
Mon, 2 Nov 2015 11:42:00 +0000 (11:42 +0000)
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>
asn1/pkcs12/packet-pkcs12-template.c
asn1/snmp/packet-snmp-template.c
epan/dissectors/packet-dvbci.c
epan/dissectors/packet-ieee802154.c
epan/dissectors/packet-lwm.c
epan/dissectors/packet-pdcp-lte.c
epan/dissectors/packet-pkcs12.c
epan/dissectors/packet-smb2.c
epan/dissectors/packet-snmp.c
epan/dissectors/packet-zbee-security.c
epan/epan.c

index d6a80dc58636ba47136975066a0201eb7130b5cb..bcdd6202a084f0a9b0c644f4eafd7a13e35dfe29 100644 (file)
@@ -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"
index c0b97d78568fbd27c824416bed9b639e72d1aef2..a94dffdf3521c642075111d5a2d5fc99f2206a8a 100644 (file)
@@ -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,
index 4360e4c2d4c6858149ebea50a6c4b862115f9dd3..c64ecb44f63896ffe924ee7470d88123b9fd3343 100644 (file)
 #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);
index 361948b8f07c68bd27da2614f0f06a36de7d9427..7dcaa95b7ed214bfdd0602c73ba3a0c6d9da3d00 100644 (file)
@@ -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"
index d3a56bec34a59402e4a739c9885ece486fd66ed1..cc2922bd8afecbe18846e61239ba1a5118eee8ca 100644 (file)
 #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
index f44efb1502d62e72177433ac074b6024bd0a1a48..0f4313b7296b637dfaadf40f5bc279458a558597 100644 (file)
 #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
index 1d98461022d417ceef07e885acb34060d79d6689..78af685fd75dd4b0de9b14596b624f24845ef5fe 100644 (file)
@@ -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");
 
index 61ec7d38995730fb6c6cfd15d4d9c114680f61e3..610d560cadb9c17cb1f634111b9c3f0f52a97591 100644 (file)
 #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
 
index 24f904ff9eb9dfc1f11e2d2c692db6c6d538149f..6a258641bf22d5ece762fb7c3d45fbe5af57ed72 100644 (file)
@@ -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 }},
index 76958adb5240a9c4acd04b6beb9aebd7c741523b..86d4a3e5b7912e468b793dc6c24185b512a1e3b8 100644 (file)
@@ -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"
index b5483191551369a8bd847de3393f603926d9ce28..b2a1f5d4f64e0fdc219f0158c9c07c735136fa59 100644 (file)
@@ -23,9 +23,7 @@
 
 #include <stdarg.h>
 
-#ifdef HAVE_LIBGCRYPT
 #include <wsutil/wsgcrypt.h>
-#endif /* HAVE_LIBGCRYPT */
 
 #ifdef HAVE_LIBGNUTLS
 #include <gnutls/gnutls.h>