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>
This commit is contained in:
Martin Kaiser 2015-10-30 17:45:53 +01:00 committed by Anders Broman
parent 7f10520d04
commit 1c5b3c3783
11 changed files with 11 additions and 37 deletions

View 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"

View 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,

View File

@ -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);

View 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"

View File

@ -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

View File

@ -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

View 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");

View File

@ -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

View 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 }},

View 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"

View 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>