forked from osmocom/wireshark
From Paolo Abeni:
Set up to build on Windows if we have GNU TLS. Define "ssl_data_set()" regardless of whether we have GNU TLS or not, as it's used in either case. Get rid of an extra #include of epan/gnuc_format_check.h. svn path=/trunk/; revision=17177
This commit is contained in:
parent
86309dc6b8
commit
ad3cb359b6
|
@ -16,7 +16,7 @@ LDFLAGS = /NOLOGO /INCREMENTAL:no /MACHINE:I386 $(LOCAL_LDFLAGS)
|
|||
CFLAGS=-DHAVE_CONFIG_H $(LOCAL_CFLAGS) $(GLIB_CFLAGS) /I. /Iwiretap \
|
||||
$(ZLIB_CFLAGS) /I$(PCAP_DIR)\include \
|
||||
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
|
||||
$(ADNS_CFLAGS) $(PCRE_CFLAGS) -D_U_="" -D_NEED_VAR_IMPORT_
|
||||
$(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) -D_U_="" -D_NEED_VAR_IMPORT_
|
||||
|
||||
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
||||
|
||||
|
@ -56,7 +56,8 @@ ethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
|||
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
|
||||
$(ADNS_LIBS) \
|
||||
$(PCRE_LIBS) \
|
||||
$(ZLIB_LIBS)
|
||||
$(ZLIB_LIBS) \
|
||||
$(GNUTLS_LIBS)
|
||||
!ENDIF
|
||||
# $(PCAP_DIR)\lib\wpcap.lib
|
||||
|
||||
|
@ -72,7 +73,8 @@ tethereal_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
|||
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
|
||||
$(ADNS_LIBS) \
|
||||
$(PCRE_LIBS) \
|
||||
$(ZLIB_LIBS)
|
||||
$(ZLIB_LIBS) \
|
||||
$(GNUTLS_LIBS)
|
||||
!ENDIF
|
||||
|
||||
capinfos_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
||||
|
@ -103,7 +105,8 @@ dftest_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
|||
epan\dfilter\dfilter.lib epan\ftypes\ftypes.lib \
|
||||
$(ADNS_LIBS) \
|
||||
$(PCRE_LIBS) \
|
||||
$(ZLIB_LIBS)
|
||||
$(ZLIB_LIBS) \
|
||||
$(GNUTLS_LIBS)
|
||||
!ENDIF
|
||||
|
||||
randpkt_LIBS= wiretap\wiretap-$(WTAP_VERSION).lib \
|
||||
|
@ -224,6 +227,7 @@ config.h : config.h.win32 config.nmake
|
|||
-e "s/@HAVE_PCAP_DATALINK_VAL_TO_NAME@/$(PCAP_DATALINK_VAL_TO_NAME_CONFIG)/" \
|
||||
-e "s/@HAVE_LIBETHEREALDLL@/$(LIBETHEREAL_CONFIG)/" \
|
||||
-e "s/@WPCAP_CONSTIFIED@/$(WPCAP_CONSTIFIED_CONFIG)/" \
|
||||
-e "s/@HAVE_GNUTLS@/$(GNUTLS_CONFIG)/" \
|
||||
< config.h.win32 > $@
|
||||
|
||||
ps.c : rdps.exe print.ps
|
||||
|
|
19
config.nmake
19
config.nmake
|
@ -73,6 +73,12 @@ GLIB_DIR=$(ETHEREAL_LIBS)\glib
|
|||
GTK1_DIR=$(ETHEREAL_LIBS)\gtk+
|
||||
GTK2_DIR=$(ETHEREAL_LIBS)\gtk2
|
||||
|
||||
#
|
||||
# If you have gnutls set this to the pathname where the lib and include files
|
||||
# are stored.
|
||||
# This enable ssl decryption
|
||||
#GNUTLS_DIR=$(ETHEREAL_LIBS)\gnutls-win32-msvc\gnutls
|
||||
|
||||
# Declare the version of your gtk2 and pango. (MAJOR + MINOR Version number
|
||||
# but without MICRO version number)
|
||||
# These macros are used by the nsis installer script and by the setup target.
|
||||
|
@ -401,5 +407,18 @@ LIBETHEREAL_CONFIG=^#define HAVE_LIBETHEREALDLL 1
|
|||
LIBETHEREAL_CONFIG=
|
||||
!ENDIF
|
||||
|
||||
!IFDEF GNUTLS_DIR
|
||||
GNUTLS_PATH=$(GNUTLS_DIR)
|
||||
GNUTLS_CFLAGS=/I$(GNUTLS_DIR)
|
||||
GNUTLS_LIBS=$(GNUTLS_DIR)\gnutls.lib
|
||||
# Nmake uses carets to escape special characters
|
||||
GNUTLS_CONFIG=^#define HAVE_GNUTLS 1
|
||||
!else
|
||||
GNUTLS_CFLAGS=
|
||||
GNUTLS_LIBS=
|
||||
GNUTLS_CONFIG=
|
||||
!ENDIF
|
||||
|
||||
|
||||
# Construct the path
|
||||
PATH=$(PATH);$(CYGWIN_PATH);$(DLL_PATH);$(ZLIB_PATH);$(ADNS_PATH)
|
||||
|
|
|
@ -11,7 +11,7 @@ include Makefile.common
|
|||
############### no need to modify below this line #########
|
||||
|
||||
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../wiretap $(GLIB_CFLAGS) \
|
||||
$(ZLIB_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) /I$(PCAP_DIR)\include \
|
||||
$(ZLIB_CFLAGS) $(ADNS_CFLAGS) $(PCRE_CFLAGS) $(GNUTLS_CFLAGS) /I$(PCAP_DIR)\include \
|
||||
-D_U_="" $(LOCAL_CFLAGS)
|
||||
|
||||
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
||||
|
@ -23,6 +23,7 @@ libethereal_LIBS = \
|
|||
$(PCRE_LIBS) \
|
||||
$(NETTLE_LIBS) \
|
||||
$(ZLIB_LIBS) \
|
||||
$(GNUTLS_LIBS) \
|
||||
$(NET_SNMP_DIR)\win32\lib\release\netsnmp.lib \
|
||||
$(ICONV_DIR)\lib\iconv.lib \
|
||||
ftypes\ftypes.lib \
|
||||
|
|
|
@ -11,7 +11,7 @@ include Makefile.common
|
|||
|
||||
CFLAGS=-DHAVE_CONFIG_H /I. /I.. /I../.. $(GLIB_CFLAGS) \
|
||||
/I$(NET_SNMP_DIR)\include /I$(NET_SNMP_DIR)\win32 \
|
||||
$(PCRE_CFLAGS) $(NETTLE_CFLAGS) \
|
||||
$(PCRE_CFLAGS) $(GNUTLS_CFLAGS) $(NETTLE_CFLAGS) \
|
||||
/I$(PCAP_DIR)\include -D_U_="" $(LOCAL_CFLAGS)
|
||||
|
||||
CVARSDLL=-DWIN32 -DNULL=0 -D_MT -D_DLL
|
||||
|
|
|
@ -29,6 +29,13 @@
|
|||
#include <string.h>
|
||||
#include "packet-ssl-utils.h"
|
||||
|
||||
void
|
||||
ssl_data_set(StringInfo* str, unsigned char* data, unsigned int len)
|
||||
{
|
||||
memcpy(str->data, data, len);
|
||||
str->data_len = len;
|
||||
}
|
||||
|
||||
#ifdef HAVE_LIBGNUTLS
|
||||
|
||||
/* hmac abstraction layer */
|
||||
|
@ -315,13 +322,6 @@ ssl_data_alloc(StringInfo* str, unsigned int len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void
|
||||
ssl_data_set(StringInfo* str, unsigned char* data, unsigned int len)
|
||||
{
|
||||
memcpy(str->data, data, len);
|
||||
str->data_len = len;
|
||||
}
|
||||
|
||||
#define PRF(ssl,secret,usage,rnd1,rnd2,out) ((ssl->version_netorder==SSLV3_VERSION)? \
|
||||
ssl3_prf(secret,usage,rnd1,rnd2,out): \
|
||||
tls_prf(secret,usage,rnd1,rnd2,out))
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include <gcrypt.h>
|
||||
#include <gnutls/x509.h>
|
||||
#include <gnutls/openssl.h>
|
||||
#include <epan/gnuc_format_check.h>
|
||||
|
||||
/* #define SSL_FAST 1 */
|
||||
#define SSL_DECRYPT_DEBUG
|
||||
|
|
Loading…
Reference in New Issue