view src/msvc-gnutls-1.patch @ 5893:53a6c7df43f8

Mesa 3D: Update to version 21.1.8. * src/mesa.mk: Update version and checksum. * src/mesa-2-uninitialized.patch: Remove file. * dist-files.mk: Remove file from list.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 16 Sep 2021 22:37:45 +0200
parents 55c51f5ec98d
children
line wrap: on
line source

diff -ur gnutls-3.2.3-orig/extra/Makefile.am gnutls-3.2.3/extra/Makefile.am
--- gnutls-3.2.3-orig/extra/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/extra/Makefile.am	2013-11-06 09:39:56 -0500
@@ -45,7 +45,9 @@
 
 # OpenSSL
 
-libgnutls_openssl_la_LDFLAGS = -no-undefined
+libgnutls_openssl_la_LDFLAGS = \
+	-no-undefined \
+	-export-symbols-regex '^(SSL|SSLv3|SSLv23|TLSv1|OpenSSL|X509|BIO|ERR|RAND|MD5|RIPEMD160)_.*'
 
 if ENABLE_OPENSSL
 lib_LTLIBRARIES = libgnutls-openssl.la
@@ -70,7 +72,7 @@
 libgnutls_openssl_la_LDFLAGS += \
 	-Wl,--output-def,libgnutls-openssl-$(DLL_VERSION).def
 libgnutls-openssl-$(DLL_VERSION).def: libgnutls-openssl.la
-defexec_DATA += libgnutls-openssl-$(DLL_VERSION).def
+#defexec_DATA += libgnutls-openssl-$(DLL_VERSION).def
 endif
 endif
 
diff -ur gnutls-3.2.3-orig/lib/Makefile.am gnutls-3.2.3/lib/Makefile.am
--- gnutls-3.2.3-orig/lib/Makefile.am	2013-07-29 03:53:00 -0400
+++ gnutls-3.2.3/lib/Makefile.am	2013-11-06 14:10:20 -0500
@@ -37,7 +37,7 @@
 	-I$(srcdir)/includes			\
 	-I$(builddir)/includes			\
 	-I$(srcdir)/x509			\
-	$(LIBTASN1_CFLAGS)			\
+	$(LIBTASN1_CFLAGS) -DASN1_STATIC	\
 	$(P11_KIT_CFLAGS)
 
 if ENABLE_OPENPGP
@@ -108,6 +108,8 @@
 
 # Separate so we can create the documentation
 
+libgnutls_la_CPPFLAGS = $(AM_CPPFLAGS) -DGNUTLS_BUILDING
+
 libgnutls_la_SOURCES = $(HFILES) $(COBJECTS) $(SRP_COBJECTS)	\
 	$(PSK_COBJECTS) \
 	gnutls.asn pkix.asn libgnutls.map
@@ -149,7 +151,7 @@
 libgnutls_la_LDFLAGS += -Wl,--output-def,libgnutls-$(DLL_VERSION).def
 libgnutls-$(DLL_VERSION).def: libgnutls.la
 defexecdir = $(bindir)
-defexec_DATA = libgnutls-$(DLL_VERSION).def
+#defexec_DATA = libgnutls-$(DLL_VERSION).def
 DISTCLEANFILES += $(defexec_DATA)
 endif
 
@@ -162,7 +164,7 @@
 # C++ library
 
 if ENABLE_CXX
-libgnutlsxx_la_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes -I$(srcdir)/includes
+libgnutlsxx_la_CPPFLAGS = -I$(top_srcdir)/includes -I$(top_builddir)/includes -I$(srcdir)/includes -DGNUTLSXX_BUILDING
 
 AM_CXXFLAGS = \
 	-I$(srcdir)/includes	\
@@ -198,7 +200,8 @@
 
 if HAVE_LD_OUTPUT_DEF
 libgnutls_xssl_la_LDFLAGS += \
-	-Wl,--output-def,libgnutls-xssl-$(DLL_VERSION).def
+	-Wl,--output-def,libgnutls-xssl-$(DLL_VERSION).def \
+	-export-symbols-regex '^(xssl_).*'
 libgnutls-xssl-$(DLL_VERSION).def: libgnutls-xssl.la
-defexec_DATA += libgnutls-xssl-$(DLL_VERSION).def
+#defexec_DATA += libgnutls-xssl-$(DLL_VERSION).def
 endif
diff -ur gnutls-3.2.3-orig/lib/accelerated/Makefile.am gnutls-3.2.3/lib/accelerated/Makefile.am
--- gnutls-3.2.3-orig/lib/accelerated/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/accelerated/Makefile.am	2013-11-06 09:39:57 -0500
@@ -21,6 +21,7 @@
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 SUBDIRS = 
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/Makefile.am gnutls-3.2.3/lib/accelerated/x86/Makefile.am
--- gnutls-3.2.3-orig/lib/accelerated/x86/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/accelerated/x86/Makefile.am	2013-11-06 09:39:57 -0500
@@ -21,6 +21,7 @@
 AM_LIBTOOLFLAGS=--tag=CC
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = -I$(srcdir)/../../../gl		\
+	-DGNUTLS_BUILDING		\
 	-I$(builddir)/../../../gl		\
 	-I$(srcdir)/../../includes	\
 	-I$(builddir)/../../includes	\
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/aes-gcm-padlock.c gnutls-3.2.3/lib/accelerated/x86/aes-gcm-padlock.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/aes-gcm-padlock.c	2013-02-10 05:29:54 -0500
+++ gnutls-3.2.3/lib/accelerated/x86/aes-gcm-padlock.c	2013-11-06 09:39:57 -0500
@@ -153,14 +153,15 @@
 }
 
 const gnutls_crypto_cipher_st aes_gcm_padlock_struct = {
-  .init = aes_gcm_cipher_init,
-  .setkey = aes_gcm_cipher_setkey,
-  .setiv = aes_gcm_setiv,
-  .encrypt = aes_gcm_encrypt,
-  .decrypt = aes_gcm_decrypt,
-  .deinit = aes_gcm_deinit,
-  .tag = aes_gcm_tag,
-  .auth = aes_gcm_auth,
+  aes_gcm_cipher_init,
+  aes_gcm_cipher_setkey,
+  aes_gcm_setiv,
+  aes_gcm_encrypt,
+  aes_gcm_decrypt,
+  aes_gcm_auth,
+  aes_gcm_tag,
+  aes_gcm_deinit,
+  NULL
 };
 
 #endif
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/aes-gcm-x86.c gnutls-3.2.3/lib/accelerated/x86/aes-gcm-x86.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/aes-gcm-x86.c	2013-02-10 05:29:54 -0500
+++ gnutls-3.2.3/lib/accelerated/x86/aes-gcm-x86.c	2013-11-06 09:39:57 -0500
@@ -259,12 +259,13 @@
 }
 
 const gnutls_crypto_cipher_st aes_gcm_struct = {
-  .init = aes_gcm_cipher_init,
-  .setkey = aes_gcm_cipher_setkey,
-  .setiv = aes_gcm_setiv,
-  .encrypt = aes_gcm_encrypt,
-  .decrypt = aes_gcm_decrypt,
-  .deinit = aes_gcm_deinit,
-  .tag = aes_gcm_tag,
-  .auth = aes_gcm_auth,
+  aes_gcm_cipher_init,
+  aes_gcm_cipher_setkey,
+  aes_gcm_setiv,
+  aes_gcm_encrypt,
+  aes_gcm_decrypt,
+  aes_gcm_auth,
+  aes_gcm_tag,
+  aes_gcm_deinit,
+  NULL
 };
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/aes-padlock.c gnutls-3.2.3/lib/accelerated/x86/aes-padlock.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/aes-padlock.c	2013-02-10 05:29:54 -0500
+++ gnutls-3.2.3/lib/accelerated/x86/aes-padlock.c	2013-11-06 09:39:57 -0500
@@ -159,12 +159,15 @@
 }
 
 static const gnutls_crypto_cipher_st aes_padlock_struct = {
-  .init = aes_cipher_init,
-  .setkey = padlock_aes_cipher_setkey,
-  .setiv = aes_setiv,
-  .encrypt = padlock_aes_cbc_encrypt,
-  .decrypt = padlock_aes_cbc_decrypt,
-  .deinit = aes_deinit,
+  aes_cipher_init,
+  padlock_aes_cipher_setkey,
+  aes_setiv,
+  padlock_aes_cbc_encrypt,
+  padlock_aes_cbc_decrypt,
+  NULL,
+  NULL,
+  aes_deinit,
+  NULL
 };
 
 static int
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/aes-x86.c gnutls-3.2.3/lib/accelerated/x86/aes-x86.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/aes-x86.c	2013-02-10 05:29:54 -0500
+++ gnutls-3.2.3/lib/accelerated/x86/aes-x86.c	2013-11-06 09:39:57 -0500
@@ -114,12 +114,15 @@
 }
 
 static const gnutls_crypto_cipher_st cipher_struct = {
-  .init = aes_cipher_init,
-  .setkey = aes_cipher_setkey,
-  .setiv = aes_setiv,
-  .encrypt = aes_encrypt,
-  .decrypt = aes_decrypt,
-  .deinit = aes_deinit,
+  aes_cipher_init,
+  aes_cipher_setkey,
+  aes_setiv,
+  aes_encrypt,
+  aes_decrypt,
+  NULL,
+  NULL,
+  aes_deinit,
+  NULL
 };
 
 static unsigned
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/hmac-padlock.c gnutls-3.2.3/lib/accelerated/x86/hmac-padlock.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/hmac-padlock.c	2013-05-25 04:52:07 -0400
+++ gnutls-3.2.3/lib/accelerated/x86/hmac-padlock.c	2013-11-06 10:05:17 -0500
@@ -333,23 +333,23 @@
 }
 
 const gnutls_crypto_mac_st hmac_sha_padlock_struct = {
-    .init = NULL,
-    .setkey = NULL,
-    .setnonce = NULL,
-    .hash = NULL,
-    .output = NULL,
-    .deinit = NULL,
-    .fast = wrap_padlock_hmac_fast
+    /*.init =*/ NULL,
+    /*.setkey =*/ NULL,
+    /*.setnonce =*/ NULL,
+    /*.hash =*/ NULL,
+    /*.output =*/ NULL,
+    /*.deinit =*/ NULL,
+    /*.fast =*/ wrap_padlock_hmac_fast
 };
 
 const gnutls_crypto_mac_st hmac_sha_padlock_nano_struct = {
-    .init = wrap_padlock_hmac_init,
-    .setkey = wrap_padlock_hmac_setkey,
-    .setnonce = NULL,
-    .hash = wrap_padlock_hmac_update,
-    .output = wrap_padlock_hmac_output,
-    .deinit = wrap_padlock_hmac_deinit,
-    .fast = wrap_padlock_hmac_fast,
+    /*.init =*/ wrap_padlock_hmac_init,
+    /*.setkey =*/ wrap_padlock_hmac_setkey,
+    /*.setnonce =*/ NULL,
+    /*.hash =*/ wrap_padlock_hmac_update,
+    /*.output =*/ wrap_padlock_hmac_output,
+    /*.deinit =*/ wrap_padlock_hmac_deinit,
+    /*.fast =*/ wrap_padlock_hmac_fast,
 };
 
 #endif /* HAVE_LIBNETTLE */
diff -ur gnutls-3.2.3-orig/lib/accelerated/x86/sha-padlock.c gnutls-3.2.3/lib/accelerated/x86/sha-padlock.c
--- gnutls-3.2.3-orig/lib/accelerated/x86/sha-padlock.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/lib/accelerated/x86/sha-padlock.c	2013-11-06 10:03:49 -0500
@@ -374,19 +374,19 @@
 const struct nettle_hash padlock_sha512 = _NETTLE_HASH(sha512, SHA512);
 
 const gnutls_crypto_digest_st sha_padlock_struct = {
-  .init = NULL,
-  .hash = NULL,
-  .output = NULL,
-  .deinit = NULL,
-  .fast = wrap_padlock_hash_fast
+  /*.init =*/ NULL,
+  /*.hash =*/ NULL,
+  /*.output =*/ NULL,
+  /*.deinit =*/ NULL,
+  /*.fast =*/ wrap_padlock_hash_fast
 };
 
 const gnutls_crypto_digest_st sha_padlock_nano_struct = {
-  .init = wrap_padlock_hash_init,
-  .hash = wrap_padlock_hash_update,
-  .output = wrap_padlock_hash_output,
-  .deinit = wrap_padlock_hash_deinit,
-  .fast = wrap_padlock_hash_fast,
+  /*.init =*/ wrap_padlock_hash_init,
+  /*.hash =*/ wrap_padlock_hash_update,
+  /*.output =*/ wrap_padlock_hash_output,
+  /*.deinit =*/ wrap_padlock_hash_deinit,
+  /*.fast =*/ wrap_padlock_hash_fast,
 };
 
 #endif /* HAVE_LIBNETTLE */
diff -ur gnutls-3.2.3-orig/lib/algorithms/Makefile.am gnutls-3.2.3/lib/algorithms/Makefile.am
--- gnutls-3.2.3-orig/lib/algorithms/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/algorithms/Makefile.am	2013-11-06 09:39:57 -0500
@@ -20,6 +20,7 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/algorithms/ecc.c gnutls-3.2.3/lib/algorithms/ecc.c
--- gnutls-3.2.3-orig/lib/algorithms/ecc.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/algorithms/ecc.c	2013-11-06 10:01:19 -0500
@@ -31,39 +31,39 @@
 
 static const gnutls_ecc_curve_entry_st ecc_curves[] = {
   {
-    .name = "SECP192R1", 
-    .oid = "1.2.840.10045.3.1.1",
-    .id = GNUTLS_ECC_CURVE_SECP192R1,
-    .tls_id = 19,
-    .size = 24,
+    /*.name =*/ "SECP192R1", 
+    /*.oid =*/ "1.2.840.10045.3.1.1",
+    /*.id =*/ GNUTLS_ECC_CURVE_SECP192R1,
+    /*.tls_id =*/ 19,
+    /*.size =*/ 24,
   },
   {
-    .name = "SECP224R1", 
-    .oid = "1.3.132.0.33",
-    .id = GNUTLS_ECC_CURVE_SECP224R1,
-    .tls_id = 21,
-    .size = 28,
+    /*.name =*/ "SECP224R1", 
+    /*.oid =*/ "1.3.132.0.33",
+    /*.id =*/ GNUTLS_ECC_CURVE_SECP224R1,
+    /*.tls_id =*/ 21,
+    /*.size =*/ 28,
   },
   {
-    .name = "SECP256R1", 
-    .oid = "1.2.840.10045.3.1.7",
-    .id = GNUTLS_ECC_CURVE_SECP256R1,
-    .tls_id = 23,
-    .size = 32,
+    /*.name =*/ "SECP256R1", 
+    /*.oid =*/ "1.2.840.10045.3.1.7",
+    /*.id =*/ GNUTLS_ECC_CURVE_SECP256R1,
+    /*.tls_id =*/ 23,
+    /*.size =*/ 32,
   },
   {
-    .name = "SECP384R1",
-    .oid = "1.3.132.0.34",
-    .id = GNUTLS_ECC_CURVE_SECP384R1,
-    .tls_id = 24,
-    .size = 48,
+    /*.name =*/ "SECP384R1",
+    /*.oid =*/ "1.3.132.0.34",
+    /*.id =*/ GNUTLS_ECC_CURVE_SECP384R1,
+    /*.tls_id =*/ 24,
+    /*.size =*/ 48,
   },
   {
-    .name = "SECP521R1",
-    .oid = "1.3.132.0.35",
-    .id = GNUTLS_ECC_CURVE_SECP521R1,
-    .tls_id = 25,
-    .size = 66,
+    /*.name =*/ "SECP521R1",
+    /*.oid =*/ "1.3.132.0.35",
+    /*.id =*/ GNUTLS_ECC_CURVE_SECP521R1,
+    /*.tls_id =*/ 25,
+    /*.size =*/ 66,
   },
   {0, 0, 0}
 };
diff -ur gnutls-3.2.3-orig/lib/auth/Makefile.am gnutls-3.2.3/lib/auth/Makefile.am
--- gnutls-3.2.3-orig/lib/auth/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/auth/Makefile.am	2013-11-06 14:26:44 -0500
@@ -20,6 +20,8 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
+	-DASN1_STATIC			\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/ext/Makefile.am gnutls-3.2.3/lib/ext/Makefile.am
--- gnutls-3.2.3-orig/lib/ext/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/ext/Makefile.am	2013-11-06 09:39:57 -0500
@@ -20,6 +20,7 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/ext/alpn.c gnutls-3.2.3/lib/ext/alpn.c
--- gnutls-3.2.3-orig/lib/ext/alpn.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/alpn.c	2013-11-06 12:50:34 -0500
@@ -38,15 +38,15 @@
 
 
 extension_entry_st ext_mod_alpn = {
-  .name = "ALPN",
-  .type = GNUTLS_EXTENSION_ALPN,
-  .parse_type = GNUTLS_EXT_APPLICATION,
+  /*.name =*/ "ALPN",
+  /*.type =*/ GNUTLS_EXTENSION_ALPN,
+  /*.parse_type =*/ GNUTLS_EXT_APPLICATION,
 
-  .recv_func = _gnutls_alpn_recv_params,
-  .send_func = _gnutls_alpn_send_params,
-  .pack_func = _gnutls_alpn_pack,
-  .unpack_func = _gnutls_alpn_unpack,
-  .deinit_func = _gnutls_alpn_deinit_data,
+  /*.recv_func =*/ _gnutls_alpn_recv_params,
+  /*.send_func =*/ _gnutls_alpn_send_params,
+  /*.deinit_func =*/ _gnutls_alpn_deinit_data,
+  /*.pack_func =*/ _gnutls_alpn_pack,
+  /*.unpack_func =*/ _gnutls_alpn_unpack,
 };
 
 static int
diff -ur gnutls-3.2.3-orig/lib/ext/cert_type.c gnutls-3.2.3/lib/ext/cert_type.c
--- gnutls-3.2.3-orig/lib/ext/cert_type.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/cert_type.c	2013-11-06 09:39:57 -0500
@@ -43,15 +43,15 @@
                                           gnutls_buffer_st * extdata);
 
 extension_entry_st ext_mod_cert_type = {
-  .name = "CERT TYPE",
-  .type = GNUTLS_EXTENSION_CERT_TYPE,
-  .parse_type = GNUTLS_EXT_TLS,
+  "CERT TYPE",
+  GNUTLS_EXTENSION_CERT_TYPE,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_cert_type_recv_params,
-  .send_func = _gnutls_cert_type_send_params,
-  .pack_func = NULL,
-  .unpack_func = NULL,
-  .deinit_func = NULL
+  _gnutls_cert_type_recv_params,
+  _gnutls_cert_type_send_params,
+  NULL,
+  NULL,
+  NULL
 };
 
 /* 
diff -ur gnutls-3.2.3-orig/lib/ext/ecc.c gnutls-3.2.3/lib/ext/ecc.c
--- gnutls-3.2.3-orig/lib/ext/ecc.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/ecc.c	2013-11-06 09:39:57 -0500
@@ -49,27 +49,27 @@
                                           gnutls_buffer_st * extdata);
 
 extension_entry_st ext_mod_supported_ecc = {
-  .name = "SUPPORTED ECC",
-  .type = GNUTLS_EXTENSION_SUPPORTED_ECC,
-  .parse_type = GNUTLS_EXT_TLS,
+  "SUPPORTED ECC",
+  GNUTLS_EXTENSION_SUPPORTED_ECC,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_supported_ecc_recv_params,
-  .send_func = _gnutls_supported_ecc_send_params,
-  .pack_func = NULL,
-  .unpack_func = NULL,
-  .deinit_func = NULL
+  _gnutls_supported_ecc_recv_params,
+  _gnutls_supported_ecc_send_params,
+  NULL,
+  NULL,
+  NULL
 };
 
 extension_entry_st ext_mod_supported_ecc_pf = {
-  .name = "SUPPORTED ECC POINT FORMATS",
-  .type = GNUTLS_EXTENSION_SUPPORTED_ECC_PF,
-  .parse_type = GNUTLS_EXT_TLS,
+  "SUPPORTED ECC POINT FORMATS",
+  GNUTLS_EXTENSION_SUPPORTED_ECC_PF,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_supported_ecc_pf_recv_params,
-  .send_func = _gnutls_supported_ecc_pf_send_params,
-  .pack_func = NULL,
-  .unpack_func = NULL,
-  .deinit_func = NULL
+  _gnutls_supported_ecc_pf_recv_params,
+  _gnutls_supported_ecc_pf_send_params,
+  NULL,
+  NULL,
+  NULL
 };
 
 /* 
diff -ur gnutls-3.2.3-orig/lib/ext/heartbeat.c gnutls-3.2.3/lib/ext/heartbeat.c
--- gnutls-3.2.3-orig/lib/ext/heartbeat.c	2013-06-08 02:50:45 -0400
+++ gnutls-3.2.3/lib/ext/heartbeat.c	2013-11-06 09:39:57 -0500
@@ -484,15 +484,15 @@
 }
 
 extension_entry_st ext_mod_heartbeat = {
-  .name = "HEARTBEAT",
-  .type = GNUTLS_EXTENSION_HEARTBEAT,
-  .parse_type = GNUTLS_EXT_TLS,
+  "HEARTBEAT",
+  GNUTLS_EXTENSION_HEARTBEAT,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_heartbeat_recv_params,
-  .send_func = _gnutls_heartbeat_send_params,
-  .pack_func = _gnutls_heartbeat_pack,
-  .unpack_func = _gnutls_heartbeat_unpack,
-  .deinit_func = NULL
+  _gnutls_heartbeat_recv_params,
+  _gnutls_heartbeat_send_params,
+  NULL,
+  _gnutls_heartbeat_pack,
+  _gnutls_heartbeat_unpack
 };
 
 #else
diff -ur gnutls-3.2.3-orig/lib/ext/max_record.c gnutls-3.2.3/lib/ext/max_record.c
--- gnutls-3.2.3-orig/lib/ext/max_record.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/max_record.c	2013-11-06 09:39:57 -0500
@@ -48,15 +48,15 @@
 
 
 extension_entry_st ext_mod_max_record_size = {
-  .name = "MAX RECORD SIZE",
-  .type = GNUTLS_EXTENSION_MAX_RECORD_SIZE,
-  .parse_type = GNUTLS_EXT_TLS,
+  "MAX RECORD SIZE",
+  GNUTLS_EXTENSION_MAX_RECORD_SIZE,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_max_record_recv_params,
-  .send_func = _gnutls_max_record_send_params,
-  .pack_func = _gnutls_max_record_pack,
-  .unpack_func = _gnutls_max_record_unpack,
-  .deinit_func = NULL
+  _gnutls_max_record_recv_params,
+  _gnutls_max_record_send_params,
+  NULL,
+  _gnutls_max_record_pack,
+  _gnutls_max_record_unpack
 };
 
 /* 
diff -ur gnutls-3.2.3-orig/lib/ext/new_record_padding.c gnutls-3.2.3/lib/ext/new_record_padding.c
--- gnutls-3.2.3-orig/lib/ext/new_record_padding.c	2013-07-28 03:31:47 -0400
+++ gnutls-3.2.3/lib/ext/new_record_padding.c	2013-11-06 12:54:19 -0500
@@ -37,16 +37,16 @@
 static int new_record_padding_before_epoch_change(gnutls_session_t session);
 
 extension_entry_st ext_mod_new_record_padding = {
-  .name = "NEW_RECORD_PADDING",
-  .type = GNUTLS_EXTENSION_NEW_RECORD_PADDING,
-  .parse_type = GNUTLS_EXT_TLS,
+  /*.name =*/ "NEW_RECORD_PADDING",
+  /*.type =*/ GNUTLS_EXTENSION_NEW_RECORD_PADDING,
+  /*.parse_type =*/ GNUTLS_EXT_TLS,
 
-  .recv_func = new_record_padding_recv_params,
-  .send_func = new_record_padding_send_params,
-  .pack_func = NULL,
-  .unpack_func = NULL,
-  .deinit_func = NULL,
-  .epoch_func = new_record_padding_before_epoch_change
+  /*.recv_func =*/ new_record_padding_recv_params,
+  /*.send_func =*/ new_record_padding_send_params,
+  /*.deinit_func =*/ NULL,
+  /*.pack_func =*/ NULL,
+  /*.unpack_func =*/ NULL,
+  /*.epoch_func =*/ new_record_padding_before_epoch_change
 };
 
 static int
diff -ur gnutls-3.2.3-orig/lib/ext/safe_renegotiation.c gnutls-3.2.3/lib/ext/safe_renegotiation.c
--- gnutls-3.2.3-orig/lib/ext/safe_renegotiation.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/safe_renegotiation.c	2013-11-06 09:39:57 -0500
@@ -31,15 +31,15 @@
 static void _gnutls_sr_deinit_data (extension_priv_data_t priv);
 
 extension_entry_st ext_mod_sr = {
-  .name = "SAFE RENEGOTIATION",
-  .type = GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
-  .parse_type = GNUTLS_EXT_MANDATORY,
+  "SAFE RENEGOTIATION",
+  GNUTLS_EXTENSION_SAFE_RENEGOTIATION,
+  GNUTLS_EXT_MANDATORY,
 
-  .recv_func = _gnutls_sr_recv_params,
-  .send_func = _gnutls_sr_send_params,
-  .pack_func = NULL,
-  .unpack_func = NULL,
-  .deinit_func = _gnutls_sr_deinit_data,
+  _gnutls_sr_recv_params,
+  _gnutls_sr_send_params,
+  _gnutls_sr_deinit_data,
+  NULL,
+  NULL
 };
 
 int
diff -ur gnutls-3.2.3-orig/lib/ext/server_name.c gnutls-3.2.3/lib/ext/server_name.c
--- gnutls-3.2.3-orig/lib/ext/server_name.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/server_name.c	2013-11-06 09:39:57 -0500
@@ -40,15 +40,15 @@
 
 
 extension_entry_st ext_mod_server_name = {
-  .name = "SERVER NAME",
-  .type = GNUTLS_EXTENSION_SERVER_NAME,
-  .parse_type = GNUTLS_EXT_APPLICATION,
+  "SERVER NAME",
+  GNUTLS_EXTENSION_SERVER_NAME,
+  GNUTLS_EXT_APPLICATION,
 
-  .recv_func = _gnutls_server_name_recv_params,
-  .send_func = _gnutls_server_name_send_params,
-  .pack_func = _gnutls_server_name_pack,
-  .unpack_func = _gnutls_server_name_unpack,
-  .deinit_func = _gnutls_server_name_deinit_data,
+  _gnutls_server_name_recv_params,
+  _gnutls_server_name_send_params,
+  _gnutls_server_name_deinit_data,
+  _gnutls_server_name_pack,
+  _gnutls_server_name_unpack
 };
 
 /*
diff -ur gnutls-3.2.3-orig/lib/ext/session_ticket.c gnutls-3.2.3/lib/ext/session_ticket.c
--- gnutls-3.2.3-orig/lib/ext/session_ticket.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/session_ticket.c	2013-11-06 09:39:57 -0500
@@ -52,15 +52,15 @@
 static void session_ticket_deinit_data (extension_priv_data_t priv);
 
 extension_entry_st ext_mod_session_ticket = {
-  .name = "SESSION TICKET",
-  .type = GNUTLS_EXTENSION_SESSION_TICKET,
-  .parse_type = GNUTLS_EXT_MANDATORY,
+  "SESSION TICKET",
+  GNUTLS_EXTENSION_SESSION_TICKET,
+  GNUTLS_EXT_MANDATORY,
 
-  .recv_func = session_ticket_recv_params,
-  .send_func = session_ticket_send_params,
-  .pack_func = session_ticket_pack,
-  .unpack_func = session_ticket_unpack,
-  .deinit_func = session_ticket_deinit_data,
+  session_ticket_recv_params,
+  session_ticket_send_params,
+  session_ticket_deinit_data,
+  session_ticket_pack,
+  session_ticket_unpack
 };
 
 #define SESSION_KEY_SIZE (SESSION_TICKET_KEY_NAME_SIZE+SESSION_TICKET_KEY_SIZE+SESSION_TICKET_MAC_SECRET_SIZE)
diff -ur gnutls-3.2.3-orig/lib/ext/signature.c gnutls-3.2.3/lib/ext/signature.c
--- gnutls-3.2.3-orig/lib/ext/signature.c	2013-06-10 03:19:30 -0400
+++ gnutls-3.2.3/lib/ext/signature.c	2013-11-06 09:39:57 -0500
@@ -46,15 +46,15 @@
                                         extension_priv_data_t * _priv);
 
 extension_entry_st ext_mod_sig = {
-  .name = "SIGNATURE ALGORITHMS",
-  .type = GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS,
-  .parse_type = GNUTLS_EXT_TLS,
+  "SIGNATURE ALGORITHMS",
+  GNUTLS_EXTENSION_SIGNATURE_ALGORITHMS,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_signature_algorithm_recv_params,
-  .send_func = _gnutls_signature_algorithm_send_params,
-  .pack_func = signature_algorithms_pack,
-  .unpack_func = signature_algorithms_unpack,
-  .deinit_func = signature_algorithms_deinit_data,
+  _gnutls_signature_algorithm_recv_params,
+  _gnutls_signature_algorithm_send_params,
+  signature_algorithms_deinit_data,
+  signature_algorithms_pack,
+  signature_algorithms_unpack
 };
 
 typedef struct
diff -ur gnutls-3.2.3-orig/lib/ext/srp.c gnutls-3.2.3/lib/ext/srp.c
--- gnutls-3.2.3-orig/lib/ext/srp.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/srp.c	2013-11-06 09:39:57 -0500
@@ -42,15 +42,15 @@
 static int _gnutls_srp_send_params (gnutls_session_t state, gnutls_buffer_st * extdata);
 
 extension_entry_st ext_mod_srp = {
-  .name = "SRP",
-  .type = GNUTLS_EXTENSION_SRP,
-  .parse_type = GNUTLS_EXT_TLS,
+  "SRP",
+  GNUTLS_EXTENSION_SRP,
+  GNUTLS_EXT_TLS,
 
-  .recv_func = _gnutls_srp_recv_params,
-  .send_func = _gnutls_srp_send_params,
-  .pack_func = _gnutls_srp_pack,
-  .unpack_func = _gnutls_srp_unpack,
-  .deinit_func = _gnutls_srp_deinit_data
+  _gnutls_srp_recv_params,
+  _gnutls_srp_send_params,
+  _gnutls_srp_deinit_data,
+  _gnutls_srp_pack,
+  _gnutls_srp_unpack
 };
 
 
diff -ur gnutls-3.2.3-orig/lib/ext/srtp.c gnutls-3.2.3/lib/ext/srtp.c
--- gnutls-3.2.3-orig/lib/ext/srtp.c	2013-07-13 05:42:56 -0400
+++ gnutls-3.2.3/lib/ext/srtp.c	2013-11-06 09:39:57 -0500
@@ -40,15 +40,15 @@
 
 
 extension_entry_st ext_mod_srtp = {
-  .name = "SRTP",
-  .type = GNUTLS_EXTENSION_SRTP,
-  .parse_type = GNUTLS_EXT_APPLICATION,
+  "SRTP",
+  GNUTLS_EXTENSION_SRTP,
+  GNUTLS_EXT_APPLICATION,
 
-  .recv_func = _gnutls_srtp_recv_params,
-  .send_func = _gnutls_srtp_send_params,
-  .pack_func = _gnutls_srtp_pack,
-  .unpack_func = _gnutls_srtp_unpack,
-  .deinit_func = _gnutls_srtp_deinit_data,
+  _gnutls_srtp_recv_params,
+  _gnutls_srtp_send_params,
+  _gnutls_srtp_deinit_data,
+  _gnutls_srtp_pack,
+  _gnutls_srtp_unpack
 };
 
 typedef struct
diff -ur gnutls-3.2.3-orig/lib/ext/status_request.c gnutls-3.2.3/lib/ext/status_request.c
--- gnutls-3.2.3-orig/lib/ext/status_request.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/ext/status_request.c	2013-11-06 09:39:57 -0500
@@ -508,14 +508,14 @@
 }
 
 extension_entry_st ext_mod_status_request = {
-  .name = "STATUS REQUEST",
-  .type = GNUTLS_EXTENSION_STATUS_REQUEST,
-  .parse_type = GNUTLS_EXT_TLS,
-  .recv_func = _gnutls_status_request_recv_params,
-  .send_func = _gnutls_status_request_send_params,
-  .pack_func = _gnutls_status_request_pack,
-  .unpack_func = _gnutls_status_request_unpack,
-  .deinit_func = _gnutls_status_request_deinit_data
+  "STATUS REQUEST",
+  GNUTLS_EXTENSION_STATUS_REQUEST,
+  GNUTLS_EXT_TLS,
+  _gnutls_status_request_recv_params,
+  _gnutls_status_request_send_params,
+  _gnutls_status_request_deinit_data,
+  _gnutls_status_request_pack,
+  _gnutls_status_request_unpack
 };
 
 /* Functions to be called from handshake */
diff -ur gnutls-3.2.3-orig/lib/extras/Makefile.am gnutls-3.2.3/lib/extras/Makefile.am
--- gnutls-3.2.3-orig/lib/extras/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/extras/Makefile.am	2013-11-06 09:39:57 -0500
@@ -20,6 +20,7 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/gnutls_cipher.c gnutls-3.2.3/lib/gnutls_cipher.c
--- gnutls-3.2.3-orig/lib/gnutls_cipher.c	2013-07-28 03:51:38 -0400
+++ gnutls-3.2.3/lib/gnutls_cipher.c	2013-11-06 13:18:32 -0500
@@ -659,7 +659,7 @@
        */
       if (explicit_iv && _gnutls_auth_cipher_is_aead(&params->read.cipher_state))
         {
-          uint8_t nonce[blocksize];
+          uint8_t *nonce = _alloca(blocksize * sizeof(uint8_t));
           /* Values in AEAD are pretty fixed in TLS 1.2 for 128-bit block
            */
           if (unlikely(params->read.IV.data == NULL || params->read.IV.size != 4))
@@ -855,7 +855,7 @@
        */
       if (explicit_iv && _gnutls_auth_cipher_is_aead(&params->read.cipher_state))
         {
-          uint8_t nonce[blocksize];
+          uint8_t * nonce;
           /* Values in AEAD are pretty fixed in TLS 1.2 for 128-bit block
            */
           if (params->read.IV.data == NULL || params->read.IV.size != 4)
@@ -864,6 +864,7 @@
           if (ciphertext->size < tag_size+AEAD_EXPLICIT_DATA_SIZE + 2)
             return gnutls_assert_val(GNUTLS_E_UNEXPECTED_PACKET_LENGTH);
 
+          nonce = (uint8_t *) malloc (sizeof (uint8_t) * blocksize);
           memcpy(nonce, params->read.IV.data, AEAD_IMPLICIT_DATA_SIZE);
           memcpy(&nonce[AEAD_IMPLICIT_DATA_SIZE], ciphertext->data, AEAD_EXPLICIT_DATA_SIZE);
           
@@ -873,6 +874,7 @@
           ciphertext->size -= AEAD_EXPLICIT_DATA_SIZE;
           
           length_to_decrypt = ciphertext->size - tag_size;
+          free (nonce);
         }
       else if (iv_size > 0) 
         { /* a stream cipher with explicit IV */
diff -ur gnutls-3.2.3-orig/lib/gnutls_global.h gnutls-3.2.3/lib/gnutls_global.h
--- gnutls-3.2.3-orig/lib/gnutls_global.h	2013-03-27 12:58:30 -0400
+++ gnutls-3.2.3/lib/gnutls_global.h	2013-11-06 13:48:03 -0500
@@ -28,8 +28,8 @@
 
 int gnutls_is_secure_memory (const void *mem);
 
-extern ASN1_TYPE _gnutls_pkix1_asn;
-extern ASN1_TYPE _gnutls_gnutls_asn;
+extern GNUTLS_EXPORTED ASN1_TYPE _gnutls_pkix1_asn;
+extern GNUTLS_EXPORTED ASN1_TYPE _gnutls_gnutls_asn;
 
 /* removed const from node_asn* to
  * prevent warnings, since libtasn1 doesn't
@@ -38,9 +38,9 @@
 #define _gnutls_get_gnutls_asn() ((ASN1_TYPE) _gnutls_gnutls_asn)
 #define _gnutls_get_pkix() ((ASN1_TYPE) _gnutls_pkix1_asn)
 
-extern gnutls_log_func _gnutls_log_func;
-extern gnutls_audit_log_func _gnutls_audit_log_func;
-extern int _gnutls_log_level;
+extern GNUTLS_EXPORTED gnutls_log_func _gnutls_log_func;
+extern GNUTLS_EXPORTED gnutls_audit_log_func _gnutls_audit_log_func;
+extern GNUTLS_EXPORTED int _gnutls_log_level;
 extern int gnutls_crypto_init (void);
 extern void gnutls_crypto_deinit (void);
 void _gnutls_priority_prefer_aes_gcm(void);
diff -ur gnutls-3.2.3-orig/lib/gnutls_mpi.h gnutls-3.2.3/lib/gnutls_mpi.h
--- gnutls-3.2.3-orig/lib/gnutls_mpi.h	2013-03-27 12:58:30 -0400
+++ gnutls-3.2.3/lib/gnutls_mpi.h	2013-11-06 09:39:58 -0500
@@ -28,7 +28,7 @@
 #include <crypto-backend.h>
 
 extern int crypto_bigint_prio;
-extern gnutls_crypto_bigint_st _gnutls_mpi_ops;
+extern GNUTLS_EXPORTED gnutls_crypto_bigint_st _gnutls_mpi_ops;
 
 bigint_t _gnutls_mpi_randomize (bigint_t, unsigned int bits,
                                 gnutls_rnd_level_t level);
diff -ur gnutls-3.2.3-orig/lib/gnutls_range.c gnutls-3.2.3/lib/gnutls_range.c
--- gnutls-3.2.3-orig/lib/gnutls_range.c	2013-07-26 01:58:21 -0400
+++ gnutls-3.2.3/lib/gnutls_range.c	2013-11-06 13:15:31 -0500
@@ -186,11 +186,13 @@
         }
       else
         {
+          ssize_t this_pad;
+
           ret = _gnutls_range_max_lh_pad (session, orig_low, max_frag);
           if (ret < 0)
             return gnutls_assert_val(ret);
 
-          ssize_t this_pad = MIN (ret, orig_high - orig_low);
+          this_pad = MIN (ret, orig_high - orig_low);
 
           _gnutls_set_range (next, orig_low, orig_low + this_pad);
           _gnutls_set_range (remainder, 0,
diff -ur gnutls-3.2.3-orig/lib/gnutls_x509.c gnutls-3.2.3/lib/gnutls_x509.c
--- gnutls-3.2.3-orig/lib/gnutls_x509.c	2013-07-19 04:44:08 -0400
+++ gnutls-3.2.3/lib/gnutls_x509.c	2013-11-06 09:39:58 -0500
@@ -1725,8 +1725,10 @@
                                    int ca_list_size)
 {
   int ret, i, j;
-  gnutls_x509_crt_t new_list[ca_list_size];
+  gnutls_x509_crt_t * new_list;
 
+  new_list = (gnutls_x509_crt_t *) malloc (sizeof (gnutls_x509_crt_t) *
+                                           ca_list_size);
   for (i = 0; i < ca_list_size; i++)
     {
       ret = gnutls_x509_crt_init (&new_list[i]);
@@ -1757,12 +1759,16 @@
       goto cleanup;
     }
 
+  free (new_list);
+
   return ret;
 
 cleanup:
   for (j=0;j<i;i++)
     gnutls_x509_crt_deinit(new_list[j]);
 
+  free (new_list);
+
   return ret;
 }
 
@@ -1988,7 +1994,10 @@
                                  int crl_list_size)
 {
   int ret, i, j;
-  gnutls_x509_crl_t new_crl[crl_list_size];
+  gnutls_x509_crl_t * new_crl;
+
+  new_crl = (gnutls_x509_crl_t *) malloc (sizeof (gnutls_x509_crl_t) *
+                                          crl_list_size);
 
   for (i = 0; i < crl_list_size; i++)
     {
@@ -2014,12 +2023,16 @@
       goto cleanup;
     }
 
+  free (new_crl);
+
   return ret;
 
 cleanup:
   for (j=0;j<i;j++)
     gnutls_x509_crl_deinit(new_crl[j]);
 
+  free (new_crl);
+
   return ret;
 }
 
diff -ur gnutls-3.2.3-orig/lib/includes/gnutls/gnutls.h.in gnutls-3.2.3/lib/includes/gnutls/gnutls.h.in
--- gnutls-3.2.3-orig/lib/includes/gnutls/gnutls.h.in	2013-07-25 07:33:02 -0400
+++ gnutls-3.2.3/lib/includes/gnutls/gnutls.h.in	2013-11-06 09:39:58 -0500
@@ -36,6 +36,16 @@
 #ifndef GNUTLS_H
 #define GNUTLS_H
 
+#ifdef _MSC_VER
+# ifdef GNUTLS_BUILDING
+#  define GNUTLS_EXPORTED __declspec(dllexport)
+# else
+#  define GNUTLS_EXPORTED __declspec(dllimport)
+# endif
+#else
+# define GNUTLS_EXPORTED
+#endif
+
 /* Get size_t. */
 #include <stddef.h>
 /* Get ssize_t. */
@@ -1436,13 +1446,13 @@
   void gnutls_global_set_time_function (gnutls_time_func time_func);
 
 /* For use in callbacks */
-  extern gnutls_alloc_function gnutls_malloc;
-  extern gnutls_alloc_function gnutls_secure_malloc;
-  extern gnutls_realloc_function gnutls_realloc;
-  extern gnutls_calloc_function gnutls_calloc;
-  extern gnutls_free_function gnutls_free;
+  extern GNUTLS_EXPORTED gnutls_alloc_function gnutls_malloc;
+  extern GNUTLS_EXPORTED gnutls_alloc_function gnutls_secure_malloc;
+  extern GNUTLS_EXPORTED gnutls_realloc_function gnutls_realloc;
+  extern GNUTLS_EXPORTED gnutls_calloc_function gnutls_calloc;
+  extern GNUTLS_EXPORTED gnutls_free_function gnutls_free;
 
-  extern char *(*gnutls_strdup) (const char *);
+  extern GNUTLS_EXPORTED char *(*gnutls_strdup) (const char *);
 
   typedef void (*gnutls_log_func) (int, const char *);
   typedef void (*gnutls_audit_log_func) (gnutls_session_t, const char *);
@@ -1603,20 +1613,20 @@
 /* The static parameters defined in draft-ietf-tls-srp-05
  * Those should be used as input to gnutls_srp_verifier().
  */
-  extern const gnutls_datum_t gnutls_srp_4096_group_prime;
-  extern const gnutls_datum_t gnutls_srp_4096_group_generator;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_4096_group_prime;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_4096_group_generator;
 
-  extern const gnutls_datum_t gnutls_srp_3072_group_prime;
-  extern const gnutls_datum_t gnutls_srp_3072_group_generator;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_3072_group_prime;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_3072_group_generator;
 
-  extern const gnutls_datum_t gnutls_srp_2048_group_prime;
-  extern const gnutls_datum_t gnutls_srp_2048_group_generator;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_2048_group_prime;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_2048_group_generator;
 
-  extern const gnutls_datum_t gnutls_srp_1536_group_prime;
-  extern const gnutls_datum_t gnutls_srp_1536_group_generator;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_1536_group_prime;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_1536_group_generator;
 
-  extern const gnutls_datum_t gnutls_srp_1024_group_prime;
-  extern const gnutls_datum_t gnutls_srp_1024_group_generator;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_1024_group_prime;
+  extern GNUTLS_EXPORTED const gnutls_datum_t gnutls_srp_1024_group_generator;
 
   typedef int gnutls_srp_server_credentials_function (gnutls_session_t,
                                                       const char *username,
diff -ur gnutls-3.2.3-orig/lib/includes/gnutls/gnutlsxx.h gnutls-3.2.3/lib/includes/gnutls/gnutlsxx.h
--- gnutls-3.2.3-orig/lib/includes/gnutls/gnutlsxx.h	2013-02-10 05:29:54 -0500
+++ gnutls-3.2.3/lib/includes/gnutls/gnutlsxx.h	2013-11-06 09:39:58 -0500
@@ -27,10 +27,20 @@
 #include <vector>
 #include <gnutls/gnutls.h>
 
+#ifdef _MSC_VER
+# ifdef GNUTLSXX_BUILDING
+#  define GNUTLSXX_EXPORTED __declspec(dllexport)
+# else
+#  define GNUTLSXX_EXPORTED __declspec(dllimport)
+# endif
+#else
+# define GNUTLSXX_EXPORTED
+#endif
+
 namespace gnutls
 {
 
-  class noncopyable
+  class GNUTLSXX_EXPORTED noncopyable
   {
   protected:
     noncopyable ()
@@ -47,7 +57,7 @@
   };
 
 
-  class exception:public std::exception
+  class GNUTLSXX_EXPORTED exception:public std::exception
   {
   public:
     exception (int x);
@@ -58,7 +68,7 @@
   };
 
 
-  class dh_params:private noncopyable
+  class GNUTLSXX_EXPORTED dh_params:private noncopyable
   {
   public:
     dh_params ();
@@ -80,7 +90,7 @@
   };
 
 
-  class rsa_params:private noncopyable
+  class GNUTLSXX_EXPORTED rsa_params:private noncopyable
   {
   public:
     rsa_params ();
@@ -106,7 +116,7 @@
       gnutls_rsa_params_t params;
   };
 
-  class session:private noncopyable
+  class GNUTLSXX_EXPORTED session:private noncopyable
   {
   protected:
     gnutls_session_t s;
@@ -220,10 +230,14 @@
   };
 
 // interface for databases
-  class DB:private noncopyable
+  class GNUTLSXX_EXPORTED DB:private noncopyable
   {
   public:
+#ifdef _MSC_VER
+    virtual ~ DB () { };
+#else
     virtual ~ DB () = 0;
+#endif
     virtual bool store (const gnutls_datum_t & key,
                         const gnutls_datum_t & data) = 0;
     virtual bool retrieve (const gnutls_datum_t & key,
@@ -231,7 +245,7 @@
     virtual bool remove (const gnutls_datum_t & key) = 0;
   };
 
-  class server_session:public session
+  class GNUTLSXX_EXPORTED server_session:public session
   {
   public:
     server_session ();
@@ -255,7 +269,7 @@
     void set_certificate_request (gnutls_certificate_request_t);
   };
 
-  class client_session:public session
+  class GNUTLSXX_EXPORTED client_session:public session
   {
   public:
     client_session ();
@@ -268,7 +282,7 @@
   };
 
 
-  class credentials:private noncopyable
+  class GNUTLSXX_EXPORTED credentials:private noncopyable
   {
   public:
     virtual ~ credentials ()
@@ -285,7 +299,7 @@
     void *cred;
   };
 
-  class certificate_credentials:public credentials
+  class GNUTLSXX_EXPORTED certificate_credentials:public credentials
   {
   public:
     ~certificate_credentials ();
@@ -332,13 +346,13 @@
       gnutls_certificate_credentials_t cred;
   };
 
-  class certificate_server_credentials:public certificate_credentials
+  class GNUTLSXX_EXPORTED certificate_server_credentials:public certificate_credentials
   {
   public:
     void set_params_function (gnutls_params_function * func);
   };
 
-  class certificate_client_credentials:public certificate_credentials
+  class GNUTLSXX_EXPORTED certificate_client_credentials:public certificate_credentials
   {
   public:
   };
@@ -346,7 +360,7 @@
 
 
 
-  class anon_server_credentials:public credentials
+  class GNUTLSXX_EXPORTED anon_server_credentials:public credentials
   {
   public:
     anon_server_credentials ();
@@ -357,7 +371,7 @@
       gnutls_anon_server_credentials_t cred;
   };
 
-  class anon_client_credentials:public credentials
+  class GNUTLSXX_EXPORTED anon_client_credentials:public credentials
   {
   public:
     anon_client_credentials ();
@@ -367,7 +381,7 @@
   };
 
 
-  class srp_server_credentials:public credentials
+  class GNUTLSXX_EXPORTED srp_server_credentials:public credentials
   {
   public:
     srp_server_credentials ();
@@ -380,7 +394,7 @@
       gnutls_srp_server_credentials_t cred;
   };
 
-  class srp_client_credentials:public credentials
+  class GNUTLSXX_EXPORTED srp_client_credentials:public credentials
   {
   public:
     srp_client_credentials ();
@@ -393,7 +407,7 @@
   };
 
 
-  class psk_server_credentials:public credentials
+  class GNUTLSXX_EXPORTED psk_server_credentials:public credentials
   {
   public:
     psk_server_credentials ();
@@ -407,7 +421,7 @@
       gnutls_psk_server_credentials_t cred;
   };
 
-  class psk_client_credentials:public credentials
+  class GNUTLSXX_EXPORTED psk_client_credentials:public credentials
   {
   public:
     psk_client_credentials ();
diff -ur gnutls-3.2.3-orig/lib/minitasn1/Makefile.am gnutls-3.2.3/lib/minitasn1/Makefile.am
--- gnutls-3.2.3-orig/lib/minitasn1/Makefile.am	2012-12-03 14:36:50 -0500
+++ gnutls-3.2.3/lib/minitasn1/Makefile.am	2013-11-06 09:39:58 -0500
@@ -21,6 +21,8 @@
 # MA 02110-1301, USA
 
 AM_CPPFLAGS = -DASN1_BUILDING		\
+	-DASN1_STATIC			\
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl          \
 	-I$(srcdir)/..
diff -ur gnutls-3.2.3-orig/lib/minitasn1/coding.c gnutls-3.2.3/lib/minitasn1/coding.c
--- gnutls-3.2.3-orig/lib/minitasn1/coding.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/minitasn1/coding.c	2013-11-06 13:11:34 -0500
@@ -519,28 +519,44 @@
 
 const tag_and_class_st _asn1_tags[] =
 {
-  [ASN1_ETYPE_GENERALSTRING] = {ASN1_TAG_GENERALSTRING, ASN1_CLASS_UNIVERSAL, "type:GENERALSTRING"},
-  [ASN1_ETYPE_NUMERIC_STRING] = {ASN1_TAG_NUMERIC_STRING, ASN1_CLASS_UNIVERSAL, "type:NUMERIC_STR"},
-  [ASN1_ETYPE_IA5_STRING] =     {ASN1_TAG_IA5_STRING, ASN1_CLASS_UNIVERSAL, "type:IA5_STR"},
-  [ASN1_ETYPE_TELETEX_STRING] = {ASN1_TAG_TELETEX_STRING, ASN1_CLASS_UNIVERSAL, "type:TELETEX_STR"},
-  [ASN1_ETYPE_PRINTABLE_STRING] = {ASN1_TAG_PRINTABLE_STRING, ASN1_CLASS_UNIVERSAL, "type:PRINTABLE_STR"},
-  [ASN1_ETYPE_UNIVERSAL_STRING] = {ASN1_TAG_UNIVERSAL_STRING, ASN1_CLASS_UNIVERSAL, "type:UNIVERSAL_STR"},
-  [ASN1_ETYPE_BMP_STRING] =       {ASN1_TAG_BMP_STRING, ASN1_CLASS_UNIVERSAL, "type:BMP_STR"},
-  [ASN1_ETYPE_UTF8_STRING] =      {ASN1_TAG_UTF8_STRING, ASN1_CLASS_UNIVERSAL, "type:UTF8_STR"},
-  [ASN1_ETYPE_VISIBLE_STRING] =   {ASN1_TAG_VISIBLE_STRING, ASN1_CLASS_UNIVERSAL, "type:VISIBLE_STR"},
-  [ASN1_ETYPE_OCTET_STRING] =    {ASN1_TAG_OCTET_STRING, ASN1_CLASS_UNIVERSAL, "type:OCT_STR"},
-  [ASN1_ETYPE_BIT_STRING] = {ASN1_TAG_BIT_STRING, ASN1_CLASS_UNIVERSAL, "type:BIT_STR"},
-  [ASN1_ETYPE_OBJECT_ID] =  {ASN1_TAG_OBJECT_ID, ASN1_CLASS_UNIVERSAL, "type:OBJ_ID"},
-  [ASN1_ETYPE_NULL] =       {ASN1_TAG_NULL, ASN1_CLASS_UNIVERSAL, "type:NULL"},
-  [ASN1_ETYPE_BOOLEAN] =    {ASN1_TAG_BOOLEAN, ASN1_CLASS_UNIVERSAL, "type:BOOLEAN"},
-  [ASN1_ETYPE_INTEGER] =    {ASN1_TAG_INTEGER, ASN1_CLASS_UNIVERSAL, "type:INTEGER"},
-  [ASN1_ETYPE_ENUMERATED] = {ASN1_TAG_ENUMERATED, ASN1_CLASS_UNIVERSAL, "type:ENUMERATED"},
-  [ASN1_ETYPE_SEQUENCE] =   {ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SEQUENCE"},
-  [ASN1_ETYPE_SEQUENCE_OF] ={ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SEQ_OF"},
-  [ASN1_ETYPE_SET] =        {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SET"},
-  [ASN1_ETYPE_SET_OF] =     {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SET_OF"},
-  [ASN1_ETYPE_GENERALIZED_TIME] = {ASN1_TAG_GENERALIZEDTime, ASN1_CLASS_UNIVERSAL, "type:GENERALIZED_TIME"},
-  [ASN1_ETYPE_UTC_TIME] = {ASN1_TAG_UTCTime, ASN1_CLASS_UNIVERSAL, "type:UTC_TIME"},
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  /*[ASN1_ETYPE_INTEGER] =*/    {ASN1_TAG_INTEGER, ASN1_CLASS_UNIVERSAL, "type:INTEGER"},
+  /*[ASN1_ETYPE_BOOLEAN] =*/    {ASN1_TAG_BOOLEAN, ASN1_CLASS_UNIVERSAL, "type:BOOLEAN"},
+  /*[ASN1_ETYPE_SEQUENCE] =*/   {ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SEQUENCE"},
+  /*[ASN1_ETYPE_BIT_STRING] =*/ {ASN1_TAG_BIT_STRING, ASN1_CLASS_UNIVERSAL, "type:BIT_STR"},
+  /*[ASN1_ETYPE_OCTET_STRING] =*/    {ASN1_TAG_OCTET_STRING, ASN1_CLASS_UNIVERSAL, "type:OCT_STR"},
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  /*[ASN1_ETYPE_SEQUENCE_OF] =*/{ASN1_TAG_SEQUENCE, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SEQ_OF"},
+  /*[ASN1_ETYPE_OBJECT_ID] =*/  {ASN1_TAG_OBJECT_ID, ASN1_CLASS_UNIVERSAL, "type:OBJ_ID"},
+  { 0, 0, NULL },
+  /*[ASN1_ETYPE_SET] =*/        {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SET"},
+  /*[ASN1_ETYPE_SET_OF] =*/     {ASN1_TAG_SET, ASN1_CLASS_UNIVERSAL | ASN1_CLASS_STRUCTURED, "type:SET_OF"},
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  /*[ASN1_ETYPE_NULL] =*/       {ASN1_TAG_NULL, ASN1_CLASS_UNIVERSAL, "type:NULL"},
+  /*[ASN1_ETYPE_ENUMERATED] =*/ {ASN1_TAG_ENUMERATED, ASN1_CLASS_UNIVERSAL, "type:ENUMERATED"},
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  { 0, 0, NULL },
+  /*[ASN1_ETYPE_GENERALSTRING] =*/ {ASN1_TAG_GENERALSTRING, ASN1_CLASS_UNIVERSAL, "type:GENERALSTRING"},
+  /*[ASN1_ETYPE_NUMERIC_STRING] =*/ {ASN1_TAG_NUMERIC_STRING, ASN1_CLASS_UNIVERSAL, "type:NUMERIC_STR"},
+  /*[ASN1_ETYPE_IA5_STRING] =*/     {ASN1_TAG_IA5_STRING, ASN1_CLASS_UNIVERSAL, "type:IA5_STR"},
+  /*[ASN1_ETYPE_TELETEX_STRING] =*/ {ASN1_TAG_TELETEX_STRING, ASN1_CLASS_UNIVERSAL, "type:TELETEX_STR"},
+  /*[ASN1_ETYPE_PRINTABLE_STRING] =*/ {ASN1_TAG_PRINTABLE_STRING, ASN1_CLASS_UNIVERSAL, "type:PRINTABLE_STR"},
+  /*[ASN1_ETYPE_UNIVERSAL_STRING] =*/ {ASN1_TAG_UNIVERSAL_STRING, ASN1_CLASS_UNIVERSAL, "type:UNIVERSAL_STR"},
+  /*[ASN1_ETYPE_BMP_STRING] =*/       {ASN1_TAG_BMP_STRING, ASN1_CLASS_UNIVERSAL, "type:BMP_STR"},
+  /*[ASN1_ETYPE_UTF8_STRING] =*/      {ASN1_TAG_UTF8_STRING, ASN1_CLASS_UNIVERSAL, "type:UTF8_STR"},
+  /*[ASN1_ETYPE_VISIBLE_STRING] =*/   {ASN1_TAG_VISIBLE_STRING, ASN1_CLASS_UNIVERSAL, "type:VISIBLE_STR"},
+  /*[ASN1_ETYPE_UTC_TIME] =*/ {ASN1_TAG_UTCTime, ASN1_CLASS_UNIVERSAL, "type:UTC_TIME"},
+  /*[ASN1_ETYPE_GENERALIZED_TIME] =*/ {ASN1_TAG_GENERALIZEDTime, ASN1_CLASS_UNIVERSAL, "type:GENERALIZED_TIME"},
 };
 
 unsigned int _asn1_tags_size = sizeof(_asn1_tags)/sizeof(_asn1_tags[0]);
diff -ur gnutls-3.2.3-orig/lib/nettle/Makefile.am gnutls-3.2.3/lib/nettle/Makefile.am
--- gnutls-3.2.3-orig/lib/nettle/Makefile.am	2013-06-19 13:05:19 -0400
+++ gnutls-3.2.3/lib/nettle/Makefile.am	2013-11-06 09:39:58 -0500
@@ -24,6 +24,7 @@
 	$(GMP_CFLAGS)
 
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/nettle/cipher.c gnutls-3.2.3/lib/nettle/cipher.c
--- gnutls-3.2.3-orig/lib/nettle/cipher.c	2013-05-27 18:19:21 -0400
+++ gnutls-3.2.3/lib/nettle/cipher.c	2013-11-06 09:39:58 -0500
@@ -394,13 +394,13 @@
 }
 
 gnutls_crypto_cipher_st _gnutls_cipher_ops = {
-  .init = wrap_nettle_cipher_init,
-  .exists = wrap_nettle_cipher_exists,
-  .setiv = wrap_nettle_cipher_setiv,
-  .setkey = wrap_nettle_cipher_setkey,
-  .encrypt = wrap_nettle_cipher_encrypt,
-  .decrypt = wrap_nettle_cipher_decrypt,
-  .deinit = wrap_nettle_cipher_close,
-  .auth = wrap_nettle_cipher_auth,
-  .tag = wrap_nettle_cipher_tag,
+  wrap_nettle_cipher_init,
+  wrap_nettle_cipher_setkey,
+  wrap_nettle_cipher_setiv,
+  wrap_nettle_cipher_encrypt,
+  wrap_nettle_cipher_decrypt,
+  wrap_nettle_cipher_auth,
+  wrap_nettle_cipher_tag,
+  wrap_nettle_cipher_close,
+  wrap_nettle_cipher_exists
 };
diff -ur gnutls-3.2.3-orig/lib/nettle/mac.c gnutls-3.2.3/lib/nettle/mac.c
--- gnutls-3.2.3-orig/lib/nettle/mac.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/nettle/mac.c	2013-11-06 09:49:12 -0500
@@ -448,21 +448,21 @@
 }
 
 gnutls_crypto_mac_st _gnutls_mac_ops = {
-  .init = wrap_nettle_mac_init,
-  .setkey = wrap_nettle_mac_set_key,
-  .setnonce = wrap_nettle_mac_set_nonce,
-  .hash = wrap_nettle_mac_update,
-  .output = wrap_nettle_mac_output,
-  .deinit = wrap_nettle_mac_deinit,
-  .fast = wrap_nettle_mac_fast,
-  .exists = wrap_nettle_mac_exists,
+  /*.init =*/ wrap_nettle_mac_init,
+  /*.setkey =*/ wrap_nettle_mac_set_key,
+  /*.setnonce =*/ wrap_nettle_mac_set_nonce,
+  /*.hash =*/ wrap_nettle_mac_update,
+  /*.output =*/ wrap_nettle_mac_output,
+  /*.deinit =*/ wrap_nettle_mac_deinit,
+  /*.fast =*/ wrap_nettle_mac_fast,
+  /*.exists =*/ wrap_nettle_mac_exists,
 };
 
 gnutls_crypto_digest_st _gnutls_digest_ops = {
-  .init = wrap_nettle_hash_init,
-  .hash = wrap_nettle_hash_update,
-  .output = wrap_nettle_hash_output,
-  .deinit = wrap_nettle_hash_deinit,
-  .fast = wrap_nettle_hash_fast,
-  .exists = wrap_nettle_hash_exists,
+  /*.init =*/ wrap_nettle_hash_init,
+  /*.hash =*/ wrap_nettle_hash_update,
+  /*.output =*/ wrap_nettle_hash_output,
+  /*.deinit =*/ wrap_nettle_hash_deinit,
+  /*.fast =*/ wrap_nettle_hash_fast,
+  /*.exists =*/ wrap_nettle_hash_exists,
 };
diff -ur gnutls-3.2.3-orig/lib/nettle/mpi.c gnutls-3.2.3/lib/nettle/mpi.c
--- gnutls-3.2.3-orig/lib/nettle/mpi.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/nettle/mpi.c	2013-11-06 09:55:25 -0500
@@ -625,28 +625,28 @@
 int crypto_bigint_prio = INT_MAX;
 
 gnutls_crypto_bigint_st _gnutls_mpi_ops = {
-  .bigint_new = wrap_nettle_mpi_new,
-  .bigint_cmp = wrap_nettle_mpi_cmp,
-  .bigint_cmp_ui = wrap_nettle_mpi_cmp_ui,
-  .bigint_mod = wrap_nettle_mpi_mod,
-  .bigint_set = wrap_nettle_mpi_set,
-  .bigint_set_ui = wrap_nettle_mpi_set_ui,
-  .bigint_get_nbits = wrap_nettle_mpi_get_nbits,
-  .bigint_powm = wrap_nettle_mpi_powm,
-  .bigint_addm = wrap_nettle_mpi_addm,
-  .bigint_subm = wrap_nettle_mpi_subm,
-  .bigint_add = wrap_nettle_mpi_add,
-  .bigint_sub = wrap_nettle_mpi_sub,
-  .bigint_add_ui = wrap_nettle_mpi_add_ui,
-  .bigint_sub_ui = wrap_nettle_mpi_sub_ui,
-  .bigint_mul = wrap_nettle_mpi_mul,
-  .bigint_mulm = wrap_nettle_mpi_mulm,
-  .bigint_mul_ui = wrap_nettle_mpi_mul_ui,
-  .bigint_div = wrap_nettle_mpi_div,
-  .bigint_prime_check = wrap_nettle_prime_check,
-  .bigint_release = wrap_nettle_mpi_release,
-  .bigint_clear = wrap_nettle_mpi_clear,
-  .bigint_print = wrap_nettle_mpi_print,
-  .bigint_scan = wrap_nettle_mpi_scan,
-  .bigint_generate_group = wrap_nettle_generate_group
+  /*.bigint_new =*/ wrap_nettle_mpi_new,
+  /*.bigint_release =*/ wrap_nettle_mpi_release,
+  /*.bigint_clear =*/ wrap_nettle_mpi_clear,
+  /*.bigint_cmp =*/ wrap_nettle_mpi_cmp,
+  /*.bigint_cmp_ui =*/ wrap_nettle_mpi_cmp_ui,
+  /*.bigint_mod =*/ wrap_nettle_mpi_mod,
+  /*.bigint_set =*/ wrap_nettle_mpi_set,
+  /*.bigint_set_ui =*/ wrap_nettle_mpi_set_ui,
+  /*.bigint_get_nbits =*/ wrap_nettle_mpi_get_nbits,
+  /*.bigint_powm =*/ wrap_nettle_mpi_powm,
+  /*.bigint_addm =*/ wrap_nettle_mpi_addm,
+  /*.bigint_subm =*/ wrap_nettle_mpi_subm,
+  /*.bigint_mulm =*/ wrap_nettle_mpi_mulm,
+  /*.bigint_add =*/ wrap_nettle_mpi_add,
+  /*.bigint_sub =*/ wrap_nettle_mpi_sub,
+  /*.bigint_mul =*/ wrap_nettle_mpi_mul,
+  /*.bigint_add_ui =*/ wrap_nettle_mpi_add_ui,
+  /*.bigint_sub_ui =*/ wrap_nettle_mpi_sub_ui,
+  /*.bigint_mul_ui =*/ wrap_nettle_mpi_mul_ui,
+  /*.bigint_div =*/ wrap_nettle_mpi_div,
+  /*.bigint_prime_check =*/ wrap_nettle_prime_check,
+  /*.bigint_generate_group =*/ wrap_nettle_generate_group,
+  /*.bigint_scan =*/ wrap_nettle_mpi_scan,
+  /*.bigint_print =*/ wrap_nettle_mpi_print
 };
diff -ur gnutls-3.2.3-orig/lib/nettle/pk.c gnutls-3.2.3/lib/nettle/pk.c
--- gnutls-3.2.3-orig/lib/nettle/pk.c	2013-05-26 06:01:21 -0400
+++ gnutls-3.2.3/lib/nettle/pk.c	2013-11-06 09:39:58 -0500
@@ -1158,13 +1158,13 @@
 int crypto_pk_prio = INT_MAX;
 
 gnutls_crypto_pk_st _gnutls_pk_ops = {
-  .hash_algorithm = wrap_nettle_hash_algorithm,
-  .encrypt = _wrap_nettle_pk_encrypt,
-  .decrypt = _wrap_nettle_pk_decrypt,
-  .sign = _wrap_nettle_pk_sign,
-  .verify = _wrap_nettle_pk_verify,
-  .verify_params = wrap_nettle_pk_verify_params,
-  .generate = wrap_nettle_pk_generate_params,
-  .pk_fixup_private_params = wrap_nettle_pk_fixup,
-  .derive = _wrap_nettle_pk_derive,
+  _wrap_nettle_pk_encrypt,
+  _wrap_nettle_pk_decrypt,
+  _wrap_nettle_pk_sign,
+  _wrap_nettle_pk_verify,
+  wrap_nettle_hash_algorithm,
+  wrap_nettle_pk_verify_params,
+  wrap_nettle_pk_generate_params,
+  wrap_nettle_pk_fixup,
+  _wrap_nettle_pk_derive
 };
diff -ur gnutls-3.2.3-orig/lib/nettle/rnd.c gnutls-3.2.3/lib/nettle/rnd.c
--- gnutls-3.2.3-orig/lib/nettle/rnd.c	2013-05-25 06:12:26 -0400
+++ gnutls-3.2.3/lib/nettle/rnd.c	2013-11-06 09:56:48 -0500
@@ -485,8 +485,8 @@
 int crypto_rnd_prio = INT_MAX;
 
 gnutls_crypto_rnd_st _gnutls_rnd_ops = {
-  .init = wrap_nettle_rnd_init,
-  .deinit = wrap_nettle_rnd_deinit,
-  .rnd = wrap_nettle_rnd,
-  .rnd_refresh = wrap_nettle_rnd_refresh,
+  /*.init =*/ wrap_nettle_rnd_init,
+  /*.rnd =*/ wrap_nettle_rnd,
+  /*.rnd_refresh =*/ wrap_nettle_rnd_refresh,
+  /*.deinit =*/ wrap_nettle_rnd_deinit
 };
diff -ur gnutls-3.2.3-orig/lib/opencdk/Makefile.am gnutls-3.2.3/lib/opencdk/Makefile.am
--- gnutls-3.2.3-orig/lib/opencdk/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/opencdk/Makefile.am	2013-11-06 09:39:58 -0500
@@ -21,6 +21,7 @@
 AM_CFLAGS = $(NETTLE_CFLAGS)
 
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/openpgp/Makefile.am gnutls-3.2.3/lib/openpgp/Makefile.am
--- gnutls-3.2.3-orig/lib/openpgp/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/openpgp/Makefile.am	2013-11-06 09:39:58 -0500
@@ -20,6 +20,7 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/lib/tpm.c gnutls-3.2.3/lib/tpm.c
--- gnutls-3.2.3-orig/lib/tpm.c	2013-05-25 06:09:44 -0400
+++ gnutls-3.2.3/lib/tpm.c	2013-11-06 13:25:56 -0500
@@ -27,10 +27,10 @@
  * Carolin Latze <latze@angry-red-pla.net> and Tobias Soder
  */
 
+#include <gnutls_int.h>
 #include <gnutls/gnutls.h>
 #include <gnutls/abstract.h>
 #include <gnutls/tpm.h>
-#include <gnutls_int.h>
 
 #ifdef HAVE_TROUSERS
 
diff -ur gnutls-3.2.3-orig/lib/x509/Makefile.am gnutls-3.2.3/lib/x509/Makefile.am
--- gnutls-3.2.3-orig/lib/x509/Makefile.am	2013-06-06 17:13:52 -0400
+++ gnutls-3.2.3/lib/x509/Makefile.am	2013-11-06 13:34:31 -0500
@@ -18,6 +18,8 @@
 
 AM_CFLAGS = $(WERROR_CFLAGS) $(WSTACK_CFLAGS) $(WARN_CFLAGS) $(NETTLE_CFLAGS)
 AM_CPPFLAGS = \
+	-DGNUTLS_BUILDING		\
+	-DASN1_STATIC			\
 	-I$(srcdir)/../../gl		\
 	-I$(builddir)/../../gl		\
 	-I$(srcdir)/../includes		\
diff -ur gnutls-3.2.3-orig/src/benchmark-cipher.c gnutls-3.2.3/src/benchmark-cipher.c
--- gnutls-3.2.3-orig/src/benchmark-cipher.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/benchmark-cipher.c	2013-11-06 14:39:15 -0500
@@ -201,9 +201,10 @@
 
 void benchmark_cipher (int init, int debug_level)
 {
+  int size = 16;
+
   gnutls_global_set_log_function (tls_log_func);
   gnutls_global_set_log_level (debug_level);
-  int size = 16;
 
   if (init)
     {
diff -ur gnutls-3.2.3-orig/src/cli.c gnutls-3.2.3/src/cli.c
--- gnutls-3.2.3-orig/src/cli.c	2013-06-10 13:24:12 -0400
+++ gnutls-3.2.3/src/cli.c	2013-11-06 14:43:12 -0500
@@ -668,7 +668,7 @@
     {
       unsigned proto_n = STACKCT_OPT(ALPN);
       char** protos  = (void*)STACKLST_OPT(ALPN);
-      gnutls_datum_t p[proto_n];
+      gnutls_datum_t* p = _alloca(proto_n * sizeof(gnutls_datum_t));
       
       for (i=0;i<proto_n;i++)
         {
diff -ur gnutls-3.2.3-orig/src/libopts/autoopts/options.h gnutls-3.2.3/src/libopts/autoopts/options.h
--- gnutls-3.2.3-orig/src/libopts/autoopts/options.h	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/libopts/autoopts/options.h	2013-11-06 09:39:58 -0500
@@ -64,7 +64,7 @@
 
 #  if defined(HAVE_STDBOOL_H)
 #    include <stdbool.h>
-#  else
+#  elif !defined(_GL_STDBOOL_H)
      typedef enum { false = 0, true = 1 } _Bool;
 #    define bool _Bool
 
diff -ur gnutls-3.2.3-orig/src/libopts/autoopts.c gnutls-3.2.3/src/libopts/autoopts.c
--- gnutls-3.2.3-orig/src/libopts/autoopts.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/libopts/autoopts.c	2013-11-06 10:12:59 -0500
@@ -96,10 +96,18 @@
 #  include "compat/pathfind.c"
 #endif
 
+#ifdef _MSC_VER
+#  define fprintf _fprintf_p
+#  define snprintf _sprintf_p
+#  define vsnprintf _vsprintf_p
+#endif
+
 #ifndef HAVE_SNPRINTF
-#  define vsnprintf       option_vsnprintf
-#  define snprintf        option_snprintf
-#  include "compat/snprintf.c"
+#  ifndef _MSC_VER
+#    define vsnprintf       option_vsnprintf
+#    define snprintf        option_snprintf
+#    include "compat/snprintf.c"
+#  endif
 #endif
 
 #ifndef HAVE_STRDUP
diff -ur gnutls-3.2.3-orig/src/libopts/compat/compat.h gnutls-3.2.3/src/libopts/compat/compat.h
--- gnutls-3.2.3-orig/src/libopts/compat/compat.h	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/libopts/compat/compat.h	2013-11-06 09:39:58 -0500
@@ -59,7 +59,9 @@
 #ifdef HAVE_SYS_MMAN_H
 #  include <sys/mman.h>
 #endif
-#include <sys/param.h>
+#if HAVE_SYS_PARAM_H
+#  include <sys/param.h>
+#endif
 #if HAVE_SYS_PROCSET_H
 #  include <sys/procset.h>
 #endif
@@ -328,7 +330,9 @@
 # define  HAVE_WINT_T           1
 #endif
 #ifndef HAVE_PID_T
+#  ifndef pid_t
   typedef signed int            pid_t;
+#  endif
 # define  HAVE_PID_T            1
 #endif
 
diff -ur gnutls-3.2.3-orig/src/libopts/compat/pathfind.c gnutls-3.2.3/src/libopts/compat/pathfind.c
--- gnutls-3.2.3-orig/src/libopts/compat/pathfind.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/libopts/compat/pathfind.c	2013-11-06 09:39:58 -0500
@@ -13,6 +13,11 @@
 
 #include "compat.h"
 #ifndef HAVE_PATHFIND
+#if defined(_MSC_VER) && !defined(R_OK)
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
 #if defined(__windows__) && !defined(__CYGWIN__)
 static char *
 pathfind( char const * path,
diff -ur gnutls-3.2.3-orig/src/libopts/configfile.c gnutls-3.2.3/src/libopts/configfile.c
--- gnutls-3.2.3-orig/src/libopts/configfile.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/src/libopts/configfile.c	2013-11-06 09:39:58 -0500
@@ -28,6 +28,11 @@
  *  13aa749a5b0a454917a944ed8fffc530b784f5ead522b1aacaf4ec8aa55a6239  COPYING.mbsd
  */
 
+#ifndef S_ISDIR
+#  define S_ISDIR(m)      (((m) & _S_IFMT) == _S_IFDIR)
+#  define S_ISREG(m)      (((m) & _S_IFMT) == _S_IFREG)
+#endif
+
 /* = = = START-STATIC-FORWARD = = = */
 static void
 file_preset(tOptions * opts, char const * fname, int dir);
diff -ur gnutls-3.2.3-orig/src/libopts/m4/libopts.m4 gnutls-3.2.3/src/libopts/m4/libopts.m4
--- gnutls-3.2.3-orig/src/libopts/m4/libopts.m4	2013-05-21 14:26:32 -0400
+++ gnutls-3.2.3/src/libopts/m4/libopts.m4	2013-11-06 11:31:21 -0500
@@ -72,7 +72,7 @@
   ${lo_have_typ_hdr} || \
     ]AC_MSG_ERROR([you must have inttypes.h or stdint.h on your system])[
 
-  for f in sys_types sys_param sys_stat \
+  for f in sys_types sys_stat \
            string errno stdlib memory setjmp
   do eval as_ac_var=\${ac_cv_header_${f}_h}
      test "X${as_ac_var}" = Xyes || {
diff -ur gnutls-3.2.3-orig/tests/cert-tests/dane gnutls-3.2.3/tests/cert-tests/dane
--- gnutls-3.2.3-orig/tests/cert-tests/dane	2013-02-27 11:28:17 -0500
+++ gnutls-3.2.3/tests/cert-tests/dane	2013-11-06 09:39:58 -0500
@@ -27,6 +27,10 @@
 
 test -e $DANETOOL || exit 77
 
+if test ! -x "$DANETOOL"; then
+  exit 77
+fi
+
 $DANETOOL --tlsa-rr --load-certificate $srcdir/cert-ecc256.pem --host www.example.com --outfile tmp-dane.rr 2>/dev/null
 
 diff $srcdir/dane-test.rr tmp-dane.rr
diff -ur gnutls-3.2.3-orig/tests/chainverify.c gnutls-3.2.3/tests/chainverify.c
--- gnutls-3.2.3-orig/tests/chainverify.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/tests/chainverify.c	2013-11-06 09:39:58 -0500
@@ -803,6 +803,8 @@
    * systems only. Disable it on windows.
    */
 #ifdef _WIN32
+  if (debug)
+    success ("Ignoring test under Win32\n");
   exit(77);
 #endif
 
diff -ur gnutls-3.2.3-orig/tests/openpgp-auth.c gnutls-3.2.3/tests/openpgp-auth.c
--- gnutls-3.2.3-orig/tests/openpgp-auth.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/tests/openpgp-auth.c	2013-11-06 09:39:58 -0500
@@ -309,6 +309,8 @@
 void
 doit ()
 {
+  if (debug)
+    success ("Ignoring test on Win32 platform\n");
   exit (77);
 }
 #endif
diff -ur gnutls-3.2.3-orig/tests/openpgp-auth2.c gnutls-3.2.3/tests/openpgp-auth2.c
--- gnutls-3.2.3-orig/tests/openpgp-auth2.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/tests/openpgp-auth2.c	2013-11-06 09:39:59 -0500
@@ -23,12 +23,13 @@
 #include <config.h>
 #endif
 
-#if !defined(_WIN32)
-
 #include <gnutls/gnutls.h>
 #include <gnutls/openpgp.h>
 
 #include "utils.h"
+
+#if !defined(_WIN32)
+
 #include <read-file.h>
 
 #include <unistd.h>
@@ -262,6 +263,8 @@
 void
 doit ()
 {
+  if (debug)
+    success ("Ignoring test on Win32 platform\n");
   exit (77);
 }
 #endif
diff -ur gnutls-3.2.3-orig/tests/rng-fork.c gnutls-3.2.3/tests/rng-fork.c
--- gnutls-3.2.3-orig/tests/rng-fork.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/tests/rng-fork.c	2013-11-06 09:39:59 -0500
@@ -107,6 +107,8 @@
 void
 doit (void)
 {
+  if (debug)
+    success ("Ignoring test on Win32 platform\n");
   exit (77);
 }
 #endif
diff -ur gnutls-3.2.3-orig/tests/slow/cipher-test.c gnutls-3.2.3/tests/slow/cipher-test.c
--- gnutls-3.2.3-orig/tests/slow/cipher-test.c	2013-05-08 14:32:30 -0400
+++ gnutls-3.2.3/tests/slow/cipher-test.c	2013-11-06 09:39:59 -0500
@@ -1,3 +1,7 @@
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 #include <stdint.h>
 #include <stdio.h>
 #include <string.h>
@@ -45,75 +49,74 @@
      "\x58\xe2\xfc\xce\xfa\x7e\x30\x61\x36\x7f\x1d\x57\xa4\xe7\x45\x5a"},
 #endif
     {
-     .key = (void*)
+     (void*)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .auth = NULL,
-     .auth_size = 0,
-     .plaintext = (void*)
+     NULL,
+     0,
+     (void*)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .plaintext_size = 16,
-     .ciphertext = (void*)
+     16,
+     (void*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
+     (void*)
      "\x03\x88\xda\xce\x60\xb6\xa3\x92\xf3\x28\xc2\xb9\x71\xb2\xfe\x78",
-     .iv = (void*)"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .tag = (void*)
+     (void*)
      "\xab\x6e\x47\xd4\x2c\xec\x13\xbd\xf5\x3a\x67\xb2\x12\x57\xbd\xdf"},
     {
-     .key = (void*)
+     (void*)
      "\xfe\xff\xe9\x92\x86\x65\x73\x1c\x6d\x6a\x8f\x94\x67\x30\x83\x08",
-     .auth = (void*)
+     (void*)
      "\xfe\xed\xfa\xce\xde\xad\xbe\xef\xfe\xed\xfa\xce\xde\xad\xbe\xef\xab\xad\xda\xd2",
-     .auth_size = 20,
-     .plaintext = (void*)
+     20,
+     (void*)
      "\xd9\x31\x32\x25\xf8\x84\x06\xe5\xa5\x59\x09\xc5\xaf\xf5\x26\x9a\x86\xa7\xa9\x53\x15\x34\xf7\xda\x2e\x4c\x30\x3d\x8a\x31\x8a\x72\x1c\x3c\x0c\x95\x95\x68\x09\x53\x2f\xcf\x0e\x24\x49\xa6\xb5\x25\xb1\x6a\xed\xf5\xaa\x0d\xe6\x57\xba\x63\x7b\x39",
-     .plaintext_size = 60,
-     .ciphertext = (void*)
+     60,
+     (void*)"\xca\xfe\xba\xbe\xfa\xce\xdb\xad\xde\xca\xf8\x88",
+     (void*)
      "\x42\x83\x1e\xc2\x21\x77\x74\x24\x4b\x72\x21\xb7\x84\xd0\xd4\x9c\xe3\xaa\x21\x2f\x2c\x02\xa4\xe0\x35\xc1\x7e\x23\x29\xac\xa1\x2e\x21\xd5\x14\xb2\x54\x66\x93\x1c\x7d\x8f\x6a\x5a\xac\x84\xaa\x05\x1b\xa3\x0b\x39\x6a\x0a\xac\x97\x3d\x58\xe0\x91",
-     .iv = (void*)"\xca\xfe\xba\xbe\xfa\xce\xdb\xad\xde\xca\xf8\x88",
-     .tag = (void*)
+     (void*)
      "\x5b\xc9\x4f\xbc\x32\x21\xa5\xdb\x94\xfa\xe9\x5a\xe7\x12\x1a\x47"}
 };
 
 
 struct aes_vectors_st aes_vectors[] = {
     {
-     .key =
      (uint8_t *)
      "\xc0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .plaintext = (uint8_t *)
+     (uint8_t *)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .ciphertext = (uint8_t *)
+     (uint8_t *)
      "\x4b\xc3\xf8\x83\x45\x0c\x11\x3c\x64\xca\x42\xe1\x11\x2a\x9e\x87",
      },
     {
-     .key = (uint8_t *)
+     (uint8_t *)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .plaintext = (uint8_t *)
+     (uint8_t *)
      "\xf3\x44\x81\xec\x3c\xc6\x27\xba\xcd\x5d\xc3\xfb\x08\xf2\x73\xe6",
-     .ciphertext = (uint8_t *)
+     (uint8_t *)
      "\x03\x36\x76\x3e\x96\x6d\x92\x59\x5a\x56\x7c\xc9\xce\x53\x7f\x5e",
      },
     {
-     .key = (uint8_t *)
+     (uint8_t *)
      "\x10\xa5\x88\x69\xd7\x4b\xe5\xa3\x74\xcf\x86\x7c\xfb\x47\x38\x59",
-     .plaintext = (uint8_t *)
+     (uint8_t *)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .ciphertext = (uint8_t *)
+     (uint8_t *)
      "\x6d\x25\x1e\x69\x44\xb0\x51\xe0\x4e\xaa\x6f\xb4\xdb\xf7\x84\x65",
      },
     {
-     .key = (uint8_t *)
+     (uint8_t *)
      "\xca\xea\x65\xcd\xbb\x75\xe9\x16\x9e\xcd\x22\xeb\xe6\xe5\x46\x75",
-     .plaintext = (uint8_t *)
+     (uint8_t *)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .ciphertext = (uint8_t *)
+     (uint8_t *)
      "\x6e\x29\x20\x11\x90\x15\x2d\xf4\xee\x05\x81\x39\xde\xf6\x10\xbb",
      },
     {
-     .key = (uint8_t *)
+     (uint8_t *)
      "\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe",
-     .plaintext = (uint8_t *)
+     (uint8_t *)
      "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00",
-     .ciphertext = (uint8_t *)
+     (uint8_t *)
      "\x9b\xa4\xa9\x14\x3f\x4e\x5d\x40\x48\x52\x1c\x4f\x88\x77\xd8\x8e",
      },
 };
@@ -352,128 +355,121 @@
 } hash_vectors[] =
 {
     {
-      .name = "SHA1",
-      .algorithm = GNUTLS_MAC_SHA1,
-      .key = NULL,
-      .plaintext =
+      "SHA1",
+      GNUTLS_MAC_SHA1,
+      NULL,
+      0,
             (uint8_t *) "what do ya want for nothing?",
-      .plaintext_size =
             sizeof ("what do ya want for nothing?") - 1,
-      .output =
             (uint8_t *)
             "\x8f\x82\x03\x94\xf9\x53\x35\x18\x20\x45\xda\x24\xf3\x4d\xe5\x2b\xf8\xbc\x34\x32",
-      .output_size = 20,
+      20,
     },
     {
-      .name = "SHA1",
-      .algorithm = GNUTLS_MAC_SHA1,
-      .key = NULL,
-      .plaintext =
+      "SHA1",
+      GNUTLS_MAC_SHA1,
+      NULL,
+      0,
             (uint8_t *)
             "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-      .plaintext_size = sizeof
+      sizeof
             ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
             - 1,
-      .output =
             (uint8_t *)
             "\xbe\xae\xd1\x6d\x65\x8e\xc7\x92\x9e\xdf\xd6\x2b\xfa\xfe\xac\x29\x9f\x0d\x74\x4d",
-      .output_size = 20,
+      20,
     },
     {
-      .name = "SHA256",
-      .algorithm = GNUTLS_MAC_SHA256,
-      .key = NULL,
-      .plaintext =
+      "SHA256",
+      GNUTLS_MAC_SHA256,
+      NULL,
+      0,
             (uint8_t *)
             "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-      .plaintext_size = sizeof
+      sizeof
             ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
             - 1,
-      .output =
             (uint8_t *)
             "\x24\x8d\x6a\x61\xd2\x06\x38\xb8\xe5\xc0\x26\x93\x0c\x3e\x60\x39\xa3\x3c\xe4\x59\x64\xff\x21\x67\xf6\xec\xed\xd4\x19\xdb\x06\xc1",
-      .output_size = 32,
+      32,
     },
     {
-      .name = "SHA256",
-      .algorithm = GNUTLS_MAC_SHA256,
-      .key = NULL,
-      .plaintext =
+      "SHA256",
+      GNUTLS_MAC_SHA256,
+      NULL,
+      0,
             (uint8_t *)
             "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-      .plaintext_size = sizeof
+      sizeof
             ("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopqabcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq")
             - 1,
-      .output =
             (uint8_t *)
             "\x50\xea\x82\x5d\x96\x84\xf4\x22\x9c\xa2\x9f\x1f\xec\x51\x15\x93\xe2\x81\xe4\x6a\x14\x0d\x81\xe0\x00\x5f\x8f\x68\x86\x69\xa0\x6c",
-      .output_size = 32,
+      32,
     },
     {
-      .name = "SHA512",
-      .algorithm = GNUTLS_MAC_SHA512,
-      .key = NULL,
-      .plaintext =
+      "SHA512",
+      GNUTLS_MAC_SHA512,
+      NULL,
+      0,
             (uint8_t *)
             "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
-      .plaintext_size = sizeof
+      sizeof
             ("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu")
             - 1,
-      .output =
             (uint8_t *)
             "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b\x87\x4b\xe9\x09",
-      .output_size = 64,
+      64,
     },
     {
-    .name = "HMAC-MD5",.algorithm = GNUTLS_MAC_MD5,.key =
-            (uint8_t *) "Jefe",.key_size = 4,.plaintext =
-            (uint8_t *) "what do ya want for nothing?",.
-            plaintext_size =
-            sizeof ("what do ya want for nothing?") - 1,.output =
+    "HMAC-MD5",GNUTLS_MAC_MD5,
+            (uint8_t *) "Jefe",4,
+            (uint8_t *) "what do ya want for nothing?",
+            sizeof ("what do ya want for nothing?") - 1,
             (uint8_t *)
-            "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",.output_size
-            = 16,}
+            "\x75\x0c\x78\x3e\x6a\xb0\xb5\x03\xea\xa8\x6e\x31\x0a\x5d\xb7\x38",
+            16,}
     ,
         /* from rfc4231 */
     {
-    .name = "HMAC-SHA2-224",.algorithm = GNUTLS_MAC_SHA224,.key =
+    "HMAC-SHA2-224",GNUTLS_MAC_SHA224,
             (uint8_t *)
-            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",.key_size
-            = 20,.plaintext = (uint8_t *) "Hi There",.plaintext_size =
-            sizeof ("Hi There") - 1,.output =
+            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+            20,(uint8_t *) "Hi There",
+            sizeof ("Hi There") - 1,
             (uint8_t *)
-            "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19\x68\x32\x10\x7c\xd4\x9d\xf3\x3f\x47\xb4\xb1\x16\x99\x12\xba\x4f\x53\x68\x4b\x22",.output_size
-            = 28,}
+            "\x89\x6f\xb1\x12\x8a\xbb\xdf\x19\x68\x32\x10\x7c\xd4\x9d\xf3\x3f\x47\xb4\xb1\x16\x99\x12\xba\x4f\x53\x68\x4b\x22",
+            28,}
     ,
     {
-    .name = "HMAC-SHA2-256",.algorithm = GNUTLS_MAC_SHA256,.key =
+    "HMAC-SHA2-256",GNUTLS_MAC_SHA256,
             (uint8_t *)
-            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",.key_size
-            = 20,.plaintext = (uint8_t *) "Hi There",.plaintext_size =
-            sizeof ("Hi There") - 1,.output =
+            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+            20,(uint8_t *) "Hi There",
+            sizeof ("Hi There") - 1,
             (uint8_t *)
-            "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32\xcf\xf7",.output_size
-            = 32,}
+            "\xb0\x34\x4c\x61\xd8\xdb\x38\x53\x5c\xa8\xaf\xce\xaf\x0b\xf1\x2b\x88\x1d\xc2\x00\xc9\x83\x3d\xa7\x26\xe9\x37\x6c\x2e\x32\xcf\xf7",
+            32,}
     ,
     {
-    .name = "HMAC-SHA2-384",.algorithm = GNUTLS_MAC_SHA384,.key =
+    "HMAC-SHA2-384",GNUTLS_MAC_SHA384,
             (uint8_t *)
-            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",.key_size
-            = 20,.plaintext = (uint8_t *) "Hi There",.plaintext_size =
-            sizeof ("Hi There") - 1,.output =
+            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+            20,(uint8_t *) "Hi There",
+            sizeof ("Hi There") - 1,
             (uint8_t *)
-            "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",.output_size
-            = 48,}
+            "\xaf\xd0\x39\x44\xd8\x48\x95\x62\x6b\x08\x25\xf4\xab\x46\x90\x7f\x15\xf9\xda\xdb\xe4\x10\x1e\xc6\x82\xaa\x03\x4c\x7c\xeb\xc5\x9c\xfa\xea\x9e\xa9\x07\x6e\xde\x7f\x4a\xf1\x52\xe8\xb2\xfa\x9c\xb6",
+            48,}
     ,
     {
-    .name = "HMAC-SHA2-512",.algorithm = GNUTLS_MAC_SHA512,.key =
+    "HMAC-SHA2-512",GNUTLS_MAC_SHA512,
             (uint8_t *)
-            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",.key_size
-            = 20,.plaintext = (uint8_t *) "Hi There",.plaintext_size =
-            sizeof ("Hi There") - 1,.output =
+            "\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b",
+            20,(uint8_t *) "Hi There",
+            sizeof ("Hi There") - 1,
             (uint8_t *)
-            "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20\x3a\x12\x68\x54",.output_size
-            = 64,}
+            "\x87\xaa\x7c\xde\xa5\xef\x61\x9d\x4f\xf0\xb4\x24\x1a\x1d\x6c\xb0\x23\x79\xf4\xe2\xce\x4e\xc2\x78\x7a\xd0\xb3\x05\x45\xe1\x7c\xde\xda\xa8\x33\xb7\xd6\xb8\xa7\x02\x03\x8b\x27\x4e\xae\xa3\xf4\xe4\xbe\x9d\x91\x4e\xeb\x61\xf1\x70\x2e\x69\x6c\x20\x3a\x12\x68\x54",
+            64,}
 ,};
 
 #define HASH_DATA_SIZE 64