Switch to using a bundled version of the openSUSE Build Service packages
for GNUTLS since they provide 32-bit and 64-bit Windows packages. We no longer have winposixtype.h, so remove its #includes and add a ssize_t typedef to config.h.win32. svn path=/trunk/; revision=31341
This commit is contained in:
parent
2ab6b0f8eb
commit
8fc1491a60
|
@ -777,9 +777,9 @@ process_libs:
|
||||||
lua5.1.4 lua$(LUA_DIST)_lib.zip
|
lua5.1.4 lua$(LUA_DIST)_lib.zip
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFDEF GNUTLS_DIR
|
!IFDEF GNUTLS_PKG
|
||||||
@$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
|
@$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
|
||||||
. gnutls-2.8.5-1.zip
|
. gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws.zip
|
||||||
!ENDIF
|
!ENDIF
|
||||||
!IFDEF PORTAUDIO_DIR
|
!IFDEF PORTAUDIO_DIR
|
||||||
@$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
|
@$(SH) $(WIN_SETUP) "$(WIN_SETUP_OPT)" "$(WIRESHARK_LIBS)" \
|
||||||
|
@ -826,7 +826,7 @@ clean_setup:
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gettext-0.17-1 # win64
|
rm -r -f $(WIRESHARK_LIBS)/gettext-0.17-1 # win64
|
||||||
rm -r -f $(WIRESHARK_LIBS)/glib
|
rm -r -f $(WIRESHARK_LIBS)/glib
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gnutls-2.8.1-1
|
rm -r -f $(WIRESHARK_LIBS)/gnutls-2.8.1-1
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gnutls-2.8.5-1
|
rm -r -f $(WIRESHARK_LIBS)/gnutls-2.8.5-*-win??ws
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gtk2
|
rm -r -f $(WIRESHARK_LIBS)/gtk2
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gtk+
|
rm -r -f $(WIRESHARK_LIBS)/gtk+
|
||||||
rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
|
rm -r -f $(WIRESHARK_LIBS)/gtk-wimp
|
||||||
|
|
|
@ -51,9 +51,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -104,7 +101,7 @@ generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
gcry_md_hd_t md;
|
gcry_md_hd_t md;
|
||||||
gcry_mpi_t num_b1 = NULL;
|
gcry_mpi_t num_b1 = NULL;
|
||||||
unsigned int pwlen;
|
size_t pwlen;
|
||||||
char hash[20], buf_b[64], buf_i[128], *p;
|
char hash[20], buf_b[64], buf_i[128], *p;
|
||||||
char *salt;
|
char *salt;
|
||||||
int salt_size;
|
int salt_size;
|
||||||
|
|
|
@ -82,9 +82,6 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -75,9 +75,6 @@
|
||||||
#include <wsutil/privileges.h>
|
#include <wsutil/privileges.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#include <wsutil/file_util.h>
|
#include <wsutil/file_util.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -242,3 +242,5 @@
|
||||||
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
|
#pragma message( "_MSC_VER is:" WS_TO_STRING(_MSC_VER) " but required is:" WS_TO_STRING(MSC_VER_REQUIRED) )
|
||||||
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
|
#error Your MSVC_VARIANT setting in config.nmake doesn't match the MS compiler version!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
typedef int ssize_t;
|
||||||
|
|
17
config.nmake
17
config.nmake
|
@ -246,14 +246,13 @@ C_ARES_PKG=1.7.0
|
||||||
#
|
#
|
||||||
# Optional: the GNUTLS library enables ssl decryption.
|
# Optional: the GNUTLS library enables ssl decryption.
|
||||||
#
|
#
|
||||||
# If you have the GNUTLS library, set this to the directory where
|
# If you have the GNUTLS library, set this to the package version.
|
||||||
# the lib and include files are stored.
|
|
||||||
#
|
#
|
||||||
# If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
|
# If you don't have GNUTLS, comment this line out, so that GNUTLS_PKG
|
||||||
# isn't defined.
|
# isn't defined.
|
||||||
#
|
#
|
||||||
# Platform SDK conflicts with openssl.h header
|
# Platform SDK conflicts with openssl.h header
|
||||||
GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.8.5-1
|
GNUTLS_PKG=2.8.5-4.12
|
||||||
|
|
||||||
#
|
#
|
||||||
# Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
|
# Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
|
||||||
|
@ -455,14 +454,13 @@ C_ARES_PKG=1.7.0
|
||||||
#
|
#
|
||||||
# Optional: the GNUTLS library enables ssl decryption.
|
# Optional: the GNUTLS library enables ssl decryption.
|
||||||
#
|
#
|
||||||
# If you have the GNUTLS library, set this to the directory where
|
# If you have the GNUTLS library, set this to the package version.
|
||||||
# the lib and include files are stored.
|
|
||||||
#
|
#
|
||||||
# If you don't have GNUTLS, comment this line out, so that GNUTLS_DIR
|
# If you don't have GNUTLS, comment this line out, so that GNUTLS_PKG
|
||||||
# isn't defined.
|
# isn't defined.
|
||||||
#
|
#
|
||||||
# Platform SDK conflicts with openssl.h header
|
# Platform SDK conflicts with openssl.h header
|
||||||
#GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-2.8.1-1
|
GNUTLS_PKG=2.8.5-3.16
|
||||||
|
|
||||||
#
|
#
|
||||||
# Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
|
# Optional: the KFW library enables kerberos/sasl/dcerpc decryption.
|
||||||
|
@ -1041,7 +1039,8 @@ NETTLE_LIBS=
|
||||||
NETTLE_CONFIG=
|
NETTLE_CONFIG=
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
!IFDEF GNUTLS_DIR
|
!IFDEF GNUTLS_PKG
|
||||||
|
GNUTLS_DIR=$(WIRESHARK_LIBS)\gnutls-$(GNUTLS_PKG)-$(WIRESHARK_TARGET_PLATFORM)ws
|
||||||
GNUTLS_PATH=$(GNUTLS_DIR)
|
GNUTLS_PATH=$(GNUTLS_DIR)
|
||||||
# /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
|
# /DNOCRYPT avoids inclusion of Wincrypt.h, avoiding a X509_NAME define clash
|
||||||
GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
|
GNUTLS_CFLAGS=/I$(GNUTLS_DIR)\include /DNOCRYPT /DIMPORT_LIGNUTLSDLL
|
||||||
|
|
|
@ -88,11 +88,6 @@ ADD: Additional generic (non-checked) ICV length of 128, 192 and 256.
|
||||||
|
|
||||||
/* If you want to be able to decrypt or Check Authentication of ESP packets you MUST define this : */
|
/* If you want to be able to decrypt or Check Authentication of ESP packets you MUST define this : */
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
|
|
||||||
|
@ -279,7 +274,7 @@ static int get_ipv6_suffix(char* ipv6_suffix, char *ipv6_address)
|
||||||
int ipv6_len = 0;
|
int ipv6_len = 0;
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
|
|
||||||
ipv6_len = strlen(ipv6_address);
|
ipv6_len = (int) strlen(ipv6_address);
|
||||||
if(ipv6_len == 0)
|
if(ipv6_len == 0)
|
||||||
{
|
{
|
||||||
/* Found a suffix */
|
/* Found a suffix */
|
||||||
|
@ -391,13 +386,13 @@ get_full_ipv6_addr(char* ipv6_addr_expanded, char *ipv6_addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
suffix_cpt = get_ipv6_suffix(suffix,ipv6_addr);
|
suffix_cpt = get_ipv6_suffix(suffix,ipv6_addr);
|
||||||
suffix_len = strlen(suffix);
|
suffix_len = (int) strlen(suffix);
|
||||||
|
|
||||||
if(suffix_len < IPSEC_STRLEN_IPV6)
|
if(suffix_len < IPSEC_STRLEN_IPV6)
|
||||||
{
|
{
|
||||||
prefix_addr = ep_strndup(ipv6_addr,strlen(ipv6_addr) - suffix_cpt);
|
prefix_addr = ep_strndup(ipv6_addr,strlen(ipv6_addr) - suffix_cpt);
|
||||||
prefix_remaining = get_ipv6_suffix(prefix,prefix_addr);
|
prefix_remaining = get_ipv6_suffix(prefix,prefix_addr);
|
||||||
prefix_len = strlen(prefix);
|
prefix_len = (int) strlen(prefix);
|
||||||
memcpy(ipv6_addr_expanded,prefix,prefix_len);
|
memcpy(ipv6_addr_expanded,prefix,prefix_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +407,7 @@ get_full_ipv6_addr(char* ipv6_addr_expanded, char *ipv6_addr)
|
||||||
if(suffix_len < IPSEC_STRLEN_IPV6)
|
if(suffix_len < IPSEC_STRLEN_IPV6)
|
||||||
return (prefix_len - prefix_remaining);
|
return (prefix_len - prefix_remaining);
|
||||||
else
|
else
|
||||||
return strlen(ipv6_addr) - suffix_cpt;
|
return (int) strlen(ipv6_addr) - suffix_cpt;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1190,7 +1185,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
|
||||||
* first character had a 0 in front of it, making the
|
* first character had a 0 in front of it, making the
|
||||||
* number of characters even.
|
* number of characters even.
|
||||||
*/
|
*/
|
||||||
key_len = (strlen(key) - 2) / 2 + 1;
|
key_len = ((guint) strlen(key) - 2) / 2 + 1;
|
||||||
*ascii_key = (gchar *) g_malloc ((key_len + 1)* sizeof(gchar));
|
*ascii_key = (gchar *) g_malloc ((key_len + 1)* sizeof(gchar));
|
||||||
hex_digit = g_ascii_xdigit_value(key[i]);
|
hex_digit = g_ascii_xdigit_value(key[i]);
|
||||||
i++;
|
i++;
|
||||||
|
@ -1209,7 +1204,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
|
||||||
* Key has an even number of characters, so we treat each
|
* Key has an even number of characters, so we treat each
|
||||||
* pair of hex digits as a single byte value.
|
* pair of hex digits as a single byte value.
|
||||||
*/
|
*/
|
||||||
key_len = (strlen(key) - 2) / 2;
|
key_len = ((guint) strlen(key) - 2) / 2;
|
||||||
*ascii_key = (gchar *) g_malloc ((key_len + 1)* sizeof(gchar));
|
*ascii_key = (gchar *) g_malloc ((key_len + 1)* sizeof(gchar));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1246,7 +1241,7 @@ compute_ascii_key(gchar **ascii_key, gchar *key)
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
key_len = strlen(key);
|
key_len = (guint) strlen(key);
|
||||||
*ascii_key = g_strdup(key);
|
*ascii_key = g_strdup(key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,9 +49,6 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#include <epan/strutil.h>
|
#include <epan/strutil.h>
|
||||||
#include <wsutil/file_util.h>
|
#include <wsutil/file_util.h>
|
||||||
|
@ -434,8 +431,8 @@ scan_pluto_log(void) {
|
||||||
gchar *icookie_pfx = "| ICOOKIE: ";
|
gchar *icookie_pfx = "| ICOOKIE: ";
|
||||||
gchar *enc_key_pfx = "| enc key: ";
|
gchar *enc_key_pfx = "| enc key: ";
|
||||||
gchar *pos, *endpos;
|
gchar *pos, *endpos;
|
||||||
gint icpfx_len = strlen(icookie_pfx);
|
gint icpfx_len = (gint) strlen(icookie_pfx);
|
||||||
gint ec_len = strlen(enc_key_pfx);
|
gint ec_len = (gint) strlen(enc_key_pfx);
|
||||||
gint i;
|
gint i;
|
||||||
address null_addr;
|
address null_addr;
|
||||||
unsigned long hexval;
|
unsigned long hexval;
|
||||||
|
@ -546,7 +543,7 @@ decrypt_payload(tvbuff_t *tvb, packet_info *pinfo, const guint8 *buf, guint buf_
|
||||||
}
|
}
|
||||||
if (decr->secret_len < gcry_cipher_get_algo_keylen(gcry_cipher_algo))
|
if (decr->secret_len < gcry_cipher_get_algo_keylen(gcry_cipher_algo))
|
||||||
return NULL;
|
return NULL;
|
||||||
cbc_block_size = gcry_cipher_get_algo_blklen(gcry_cipher_algo);
|
cbc_block_size = (guint32) gcry_cipher_get_algo_blklen(gcry_cipher_algo);
|
||||||
|
|
||||||
switch(decr->hash_alg) {
|
switch(decr->hash_alg) {
|
||||||
case HMAC_MD5:
|
case HMAC_MD5:
|
||||||
|
|
|
@ -53,11 +53,6 @@
|
||||||
#include "packet-ntp.h"
|
#include "packet-ntp.h"
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
|
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,6 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -196,7 +193,7 @@ generate_key_or_iv(unsigned int id, tvbuff_t *salt_tvb, unsigned int iter,
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
gcry_md_hd_t md;
|
gcry_md_hd_t md;
|
||||||
gcry_mpi_t num_b1 = NULL;
|
gcry_mpi_t num_b1 = NULL;
|
||||||
unsigned int pwlen;
|
size_t pwlen;
|
||||||
char hash[20], buf_b[64], buf_i[128], *p;
|
char hash[20], buf_b[64], buf_i[128], *p;
|
||||||
char *salt;
|
char *salt;
|
||||||
int salt_size;
|
int salt_size;
|
||||||
|
@ -497,7 +494,7 @@ dissect_pkcs12_T_version(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offse
|
||||||
|
|
||||||
|
|
||||||
static const ber_sequence_t DigestInfo_sequence[] = {
|
static const ber_sequence_t DigestInfo_sequence[] = {
|
||||||
{ &hf_pkcs12_digestAlgorithm, BER_CLASS_UNI, BER_UNI_TAG_SEQUENCE, BER_FLAGS_NOOWNTAG, dissect_cms_DigestAlgorithmIdentifier },
|
{ &hf_pkcs12_digestAlgorithm, -1/*imported*/, -1/*imported*/, BER_FLAGS_NOOWNTAG, dissect_cms_DigestAlgorithmIdentifier },
|
||||||
{ &hf_pkcs12_digest , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cms_Digest },
|
{ &hf_pkcs12_digest , BER_CLASS_UNI, BER_UNI_TAG_OCTETSTRING, BER_FLAGS_NOOWNTAG, dissect_cms_Digest },
|
||||||
{ NULL, 0, 0, 0, NULL }
|
{ NULL, 0, 0, 0, NULL }
|
||||||
};
|
};
|
||||||
|
|
|
@ -90,9 +90,6 @@
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -298,7 +295,7 @@ static int hf_snmp_priority = -1; /* INTEGER_M1_2147483647 */
|
||||||
static int hf_snmp_operation = -1; /* T_operation */
|
static int hf_snmp_operation = -1; /* T_operation */
|
||||||
|
|
||||||
/*--- End of included file: packet-snmp-hf.c ---*/
|
/*--- End of included file: packet-snmp-hf.c ---*/
|
||||||
#line 224 "packet-snmp-template.c"
|
#line 221 "packet-snmp-template.c"
|
||||||
|
|
||||||
static int hf_smux_version = -1;
|
static int hf_smux_version = -1;
|
||||||
static int hf_smux_pdutype = -1;
|
static int hf_smux_pdutype = -1;
|
||||||
|
@ -341,7 +338,7 @@ static gint ett_snmp_SimpleOpen_U = -1;
|
||||||
static gint ett_snmp_RReqPDU_U = -1;
|
static gint ett_snmp_RReqPDU_U = -1;
|
||||||
|
|
||||||
/*--- End of included file: packet-snmp-ett.c ---*/
|
/*--- End of included file: packet-snmp-ett.c ---*/
|
||||||
#line 243 "packet-snmp-template.c"
|
#line 240 "packet-snmp-template.c"
|
||||||
|
|
||||||
static const true_false_string auth_flags = {
|
static const true_false_string auth_flags = {
|
||||||
"OK",
|
"OK",
|
||||||
|
@ -2666,7 +2663,7 @@ static void dissect_SMUX_PDUs_PDU(tvbuff_t *tvb _U_, packet_info *pinfo _U_, pro
|
||||||
|
|
||||||
|
|
||||||
/*--- End of included file: packet-snmp-fn.c ---*/
|
/*--- End of included file: packet-snmp-fn.c ---*/
|
||||||
#line 1446 "packet-snmp-template.c"
|
#line 1443 "packet-snmp-template.c"
|
||||||
|
|
||||||
|
|
||||||
guint
|
guint
|
||||||
|
@ -3488,7 +3485,7 @@ void proto_register_snmp(void) {
|
||||||
"snmp.T_operation", HFILL }},
|
"snmp.T_operation", HFILL }},
|
||||||
|
|
||||||
/*--- End of included file: packet-snmp-hfarr.c ---*/
|
/*--- End of included file: packet-snmp-hfarr.c ---*/
|
||||||
#line 2003 "packet-snmp-template.c"
|
#line 2000 "packet-snmp-template.c"
|
||||||
};
|
};
|
||||||
|
|
||||||
/* List of subtrees */
|
/* List of subtrees */
|
||||||
|
@ -3528,7 +3525,7 @@ void proto_register_snmp(void) {
|
||||||
&ett_snmp_RReqPDU_U,
|
&ett_snmp_RReqPDU_U,
|
||||||
|
|
||||||
/*--- End of included file: packet-snmp-ettarr.c ---*/
|
/*--- End of included file: packet-snmp-ettarr.c ---*/
|
||||||
#line 2019 "packet-snmp-template.c"
|
#line 2016 "packet-snmp-template.c"
|
||||||
};
|
};
|
||||||
module_t *snmp_module;
|
module_t *snmp_module;
|
||||||
|
|
||||||
|
|
|
@ -793,14 +793,14 @@ struct _SslDecompress {
|
||||||
};
|
};
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
ssl_data_alloc(StringInfo* str, guint len)
|
ssl_data_alloc(StringInfo* str, size_t len)
|
||||||
{
|
{
|
||||||
str->data = g_malloc(len);
|
str->data = g_malloc(len);
|
||||||
/* the allocator can return a null pointer for a size equal to 0,
|
/* the allocator can return a null pointer for a size equal to 0,
|
||||||
* and that must be allowed */
|
* and that must be allowed */
|
||||||
if (len > 0 && !str->data)
|
if (len > 0 && !str->data)
|
||||||
return -1;
|
return -1;
|
||||||
str->data_len = len;
|
str->data_len = (guint) len;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1118,7 +1118,7 @@ ssl_private_decrypt(guint len, guchar* encr_data, SSL_PRIVATE_KEY* pk)
|
||||||
rc = 0;
|
rc = 0;
|
||||||
for (i = 1; i < decr_len; i++) {
|
for (i = 1; i < decr_len; i++) {
|
||||||
if (decr_data_ptr[i] == 0) {
|
if (decr_data_ptr[i] == 0) {
|
||||||
rc = i+1;
|
rc = (gint) i+1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1167,7 +1167,7 @@ out:
|
||||||
decr_len -= rc;
|
decr_len -= rc;
|
||||||
#endif /* SSL_FAST */
|
#endif /* SSL_FAST */
|
||||||
gcry_mpi_release(text);
|
gcry_mpi_release(text);
|
||||||
return decr_len;
|
return (int) decr_len;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stringinfo interface */
|
/* stringinfo interface */
|
||||||
|
@ -1322,7 +1322,7 @@ tls_prf(StringInfo* secret, const gchar *usage,
|
||||||
guint8 *ptr;
|
guint8 *ptr;
|
||||||
StringInfo s1, s2;
|
StringInfo s1, s2;
|
||||||
guint i,s_l, r;
|
guint i,s_l, r;
|
||||||
gint usage_len;
|
size_t usage_len;
|
||||||
r=-1;
|
r=-1;
|
||||||
usage_len = strlen(usage);
|
usage_len = strlen(usage);
|
||||||
|
|
||||||
|
@ -2189,7 +2189,7 @@ ssl_privkey_to_sexp(struct gnutls_x509_privkey_int* priv_key)
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
ssl_debug_printf( "gnutls_x509_privkey_get_key_id(ssl_pkey, 0, buf_keyid, &buf_len) - %s\n", gnutls_strerror(ret));
|
ssl_debug_printf( "gnutls_x509_privkey_get_key_id(ssl_pkey, 0, buf_keyid, &buf_len) - %s\n", gnutls_strerror(ret));
|
||||||
} else {
|
} else {
|
||||||
ssl_debug_printf( "Private key imported: KeyID %s\n", bytes_to_str_punct(buf_keyid, buf_len, ':'));
|
ssl_debug_printf( "Private key imported: KeyID %s\n", bytes_to_str_punct(buf_keyid, (int) buf_len, ':'));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -2298,7 +2298,7 @@ ssl_load_key(FILE* fp)
|
||||||
}
|
}
|
||||||
key.data = g_malloc(size);
|
key.data = g_malloc(size);
|
||||||
key.size = size;
|
key.size = size;
|
||||||
bytes = fread(key.data, 1, key.size, fp);
|
bytes = (guint) fread(key.data, 1, key.size, fp);
|
||||||
if (bytes < key.size) {
|
if (bytes < key.size) {
|
||||||
ssl_debug_printf("ssl_load_key: can't read from file %d bytes, got %d\n",
|
ssl_debug_printf("ssl_load_key: can't read from file %d bytes, got %d\n",
|
||||||
key.size, bytes);
|
key.size, bytes);
|
||||||
|
@ -2341,13 +2341,13 @@ const char *BAGTYPE(gnutls_pkcs12_bag_type_t x) {
|
||||||
Ssl_private_key_t *
|
Ssl_private_key_t *
|
||||||
ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd) {
|
ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd) {
|
||||||
|
|
||||||
int i, j, ret, len;
|
int i, j, ret;
|
||||||
size_t rest;
|
int rest;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
gnutls_datum_t data;
|
gnutls_datum_t data;
|
||||||
gnutls_pkcs12_bag_t bag = NULL;
|
gnutls_pkcs12_bag_t bag = NULL;
|
||||||
gnutls_pkcs12_bag_type_t bag_type;
|
gnutls_pkcs12_bag_type_t bag_type;
|
||||||
size_t buf_len;
|
size_t len, buf_len;
|
||||||
static char buf_name[256];
|
static char buf_name[256];
|
||||||
static char buf_email[128];
|
static char buf_email[128];
|
||||||
unsigned char buf_keyid[32];
|
unsigned char buf_keyid[32];
|
||||||
|
@ -2367,7 +2367,7 @@ ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd) {
|
||||||
p = data.data;
|
p = data.data;
|
||||||
while ((len = fread(p, 1, rest, fp)) > 0) {
|
while ((len = fread(p, 1, rest, fp)) > 0) {
|
||||||
p += len;
|
p += len;
|
||||||
rest -= len;
|
rest -= (int) len;
|
||||||
if (!rest) {
|
if (!rest) {
|
||||||
rest = 1024;
|
rest = 1024;
|
||||||
data.data = g_realloc(data.data, data.size + rest);
|
data.data = g_realloc(data.data, data.size + rest);
|
||||||
|
@ -2457,7 +2457,7 @@ ssl_load_pkcs12(FILE* fp, const gchar *cert_passwd) {
|
||||||
if (ret < 0) { g_strlcpy(buf_keyid, "<ERROR>", 32); }
|
if (ret < 0) { g_strlcpy(buf_keyid, "<ERROR>", 32); }
|
||||||
|
|
||||||
private_key->x509_cert = ssl_cert;
|
private_key->x509_cert = ssl_cert;
|
||||||
ssl_debug_printf( "Certificate imported: %s <%s>, KeyID %s\n", buf_name, buf_email, bytes_to_str(buf_keyid, buf_len));
|
ssl_debug_printf( "Certificate imported: %s <%s>, KeyID %s\n", buf_name, buf_email, bytes_to_str(buf_keyid, (int) buf_len));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GNUTLS_BAG_PKCS8_KEY:
|
case GNUTLS_BAG_PKCS8_KEY:
|
||||||
|
@ -3215,7 +3215,7 @@ ssl_debug_printf(const gchar* fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ssl_print_text_data(const gchar* name, const guchar* data, gint len)
|
ssl_print_text_data(const gchar* name, const guchar* data, size_t len)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
if (!ssl_debug_file)
|
if (!ssl_debug_file)
|
||||||
|
@ -3228,7 +3228,7 @@ ssl_print_text_data(const gchar* name, const guchar* data, gint len)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ssl_print_data(const gchar* name, const guchar* data, gint len)
|
ssl_print_data(const gchar* name, const guchar* data, size_t len)
|
||||||
{
|
{
|
||||||
gint i;
|
gint i;
|
||||||
if (!ssl_debug_file)
|
if (!ssl_debug_file)
|
||||||
|
|
|
@ -33,10 +33,6 @@
|
||||||
#include <epan/value_string.h>
|
#include <epan/value_string.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBGNUTLS
|
#ifdef HAVE_LIBGNUTLS
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#include <gnutls/x509.h>
|
#include <gnutls/x509.h>
|
||||||
|
@ -175,6 +171,7 @@ extern const value_string pct_exch_type[];
|
||||||
extern const value_string pct_error_code[];
|
extern const value_string pct_error_code[];
|
||||||
extern const value_string tls_hello_extension_types[];
|
extern const value_string tls_hello_extension_types[];
|
||||||
|
|
||||||
|
/* XXX Should we use GByteArray instead? */
|
||||||
typedef struct _StringInfo {
|
typedef struct _StringInfo {
|
||||||
guchar* data;
|
guchar* data;
|
||||||
guint data_len;
|
guint data_len;
|
||||||
|
@ -491,11 +488,11 @@ ssl_is_valid_content_type(guint8 type);
|
||||||
extern void
|
extern void
|
||||||
ssl_debug_printf(const gchar* fmt,...) GNUC_FORMAT_CHECK(printf,1,2);
|
ssl_debug_printf(const gchar* fmt,...) GNUC_FORMAT_CHECK(printf,1,2);
|
||||||
extern void
|
extern void
|
||||||
ssl_print_data(const gchar* name, const guchar* data, gint len);
|
ssl_print_data(const gchar* name, const guchar* data, size_t len);
|
||||||
extern void
|
extern void
|
||||||
ssl_print_string(const gchar* name, const StringInfo* data);
|
ssl_print_string(const gchar* name, const StringInfo* data);
|
||||||
extern void
|
extern void
|
||||||
ssl_print_text_data(const gchar* name, const guchar* data, gint len);
|
ssl_print_text_data(const gchar* name, const guchar* data, size_t len);
|
||||||
extern void
|
extern void
|
||||||
ssl_set_debug(gchar* name);
|
ssl_set_debug(gchar* name);
|
||||||
extern void
|
extern void
|
||||||
|
|
|
@ -42,10 +42,6 @@
|
||||||
* we can do is parse the security header and give up.
|
* we can do is parse the security header and give up.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#ifdef _WIN32
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
|
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
|
|
||||||
|
|
|
@ -25,10 +25,6 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (defined(HAVE_LIBGCRYPT) || defined(HAVE_LIBGNUTLS)) && defined(_WIN32)
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
|
|
|
@ -45,10 +45,7 @@
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifndef _WIN32
|
||||||
/* #include <windows.h> */
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#else
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/sysinfo.h>
|
#include <sys/sysinfo.h>
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# 32-bit wrapper for win-setup.sh.
|
# 32-bit wrapper for win-setup.sh.
|
||||||
|
|
||||||
export DOWNLOAD_TAG="2009-12-17"
|
export DOWNLOAD_TAG="2009-12-21"
|
||||||
export WIRESHARK_TARGET_PLATFORM="win32"
|
export WIRESHARK_TARGET_PLATFORM="win32"
|
||||||
|
|
||||||
WIN_SETUP=`echo $0 | sed -e s/win32/win/`
|
WIN_SETUP=`echo $0 | sed -e s/win32/win/`
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
# 64-bit wrapper for win-setup.sh.
|
# 64-bit wrapper for win-setup.sh.
|
||||||
|
|
||||||
export DOWNLOAD_TAG="2009-12-17"
|
export DOWNLOAD_TAG="2009-12-21"
|
||||||
export WIRESHARK_TARGET_PLATFORM="win64"
|
export WIRESHARK_TARGET_PLATFORM="win64"
|
||||||
|
|
||||||
WIN_SETUP=`echo $0 | sed -e s/win64/win/`
|
WIN_SETUP=`echo $0 | sed -e s/win64/win/`
|
||||||
|
|
|
@ -45,10 +45,6 @@
|
||||||
#include <pcre.h> /* to get the libpcre version number */
|
#include <pcre.h> /* to get the libpcre version number */
|
||||||
#endif /* HAVE_LIBPCRE */
|
#endif /* HAVE_LIBPCRE */
|
||||||
|
|
||||||
#if (defined(HAVE_LIBGCRYPT) || defined(HAVE_LIBGNUTLS)) && defined(_WIN32)
|
|
||||||
#include <winposixtype.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_LIBGCRYPT
|
#ifdef HAVE_LIBGCRYPT
|
||||||
#include <gcrypt.h>
|
#include <gcrypt.h>
|
||||||
#endif /* HAVE_LIBGCRYPT */
|
#endif /* HAVE_LIBGCRYPT */
|
||||||
|
|
Loading…
Reference in New Issue