Skip to content

Commit

Permalink
project: Update for 3.8.0 merge.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Mar 11, 2023
1 parent 870a6ad commit fc4865b
Show file tree
Hide file tree
Showing 8 changed files with 1,292 additions and 1,262 deletions.
69 changes: 46 additions & 23 deletions SMP/SMP.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
diff --git a/gnulib b/gnulib
index 6ec9bc736..3639c57a9 160000
--- a/gnulib
+++ b/gnulib
@@ -1 +1 @@
-Subproject commit 6ec9bc73686fd42d0a1a82c914d89176745cddbd
+Subproject commit 3639c57a970191e0bf7a9789bd1341786d0255a1
diff --git a/lib/accelerated/x86/x86-common.c b/lib/accelerated/x86/x86-common.c
index 7ddaa594e..b2bbf7f2f 100644
index 24744c41c..8ac5ec11a 100644
--- a/lib/accelerated/x86/x86-common.c
+++ b/lib/accelerated/x86/x86-common.c
@@ -40,6 +40,35 @@
Expand Down Expand Up @@ -39,10 +46,10 @@ index 7ddaa594e..b2bbf7f2f 100644
# define __get_cpuid(...) 0
# define __get_cpuid_count(...) 0
diff --git a/lib/datum.h b/lib/datum.h
index 35b9e3b97..e19211146 100644
index 87fb91b5f..ab5afd908 100644
--- a/lib/datum.h
+++ b/lib/datum.h
@@ -48,7 +48,7 @@ void _gnutls_free_datum(gnutls_datum_t * dat)
@@ -46,7 +46,7 @@ void _gnutls_free_datum(gnutls_datum_t * dat)
}
}

Expand All @@ -51,7 +58,7 @@ index 35b9e3b97..e19211146 100644
void _gnutls_free_temp_key_datum(gnutls_datum_t * dat)
{
if (dat->data != NULL) {
@@ -59,7 +59,7 @@ void _gnutls_free_temp_key_datum(gnutls_datum_t * dat)
@@ -57,7 +57,7 @@ void _gnutls_free_temp_key_datum(gnutls_datum_t * dat)
dat->size = 0;
}

Expand All @@ -61,7 +68,7 @@ index 35b9e3b97..e19211146 100644
{
if (dat->data != NULL) {
diff --git a/lib/debug.c b/lib/debug.c
index 991f7a7be..6d468674a 100644
index 532fa2a92..2b2259754 100644
--- a/lib/debug.c
+++ b/lib/debug.c
@@ -31,7 +31,11 @@
Expand All @@ -76,20 +83,20 @@ index 991f7a7be..6d468674a 100644
size_t n = sizeof buf;

if (_gnutls_mpi_print(a, buf, &n))
@@ -44,7 +48,11 @@ void _gnutls_dump_mpi(const char *prefix, bigint_t a)
void
_gnutls_dump_vector(const char *prefix, const uint8_t * a, size_t a_size)
@@ -43,7 +47,11 @@ void _gnutls_dump_mpi(const char *prefix, bigint_t a)

void _gnutls_dump_vector(const char *prefix, const uint8_t * a, size_t a_size)
{
+#if defined(_MSC_VER)
+ char* buf_hex = (char*)_alloca((2 * a_size + 1) * sizeof(char));
+#else
char buf_hex[2 * a_size + 1];
+#endif

_gnutls_debug_log("Vector: length: %d\n\t%s%s\n", (int) a_size,
_gnutls_debug_log("Vector: length: %d\n\t%s%s\n", (int)a_size,
prefix, _gnutls_bin2hex(a, a_size, buf_hex,
diff --git a/lib/global.c b/lib/global.c
index 1b372c15b..a77ea054f 100644
index 0ae68099c..61bf3a652 100644
--- a/lib/global.c
+++ b/lib/global.c
@@ -47,11 +47,32 @@
Expand Down Expand Up @@ -129,7 +136,7 @@ index 1b372c15b..a77ea054f 100644
#endif

#ifndef _WIN32
@@ -482,7 +503,8 @@ const char *gnutls_check_version(const char *req_version)
@@ -484,7 +505,8 @@ const char *gnutls_check_version(const char *req_version)
return NULL;
}

Expand All @@ -139,7 +146,7 @@ index 1b372c15b..a77ea054f 100644
{
int ret;
const char *e;
@@ -512,7 +534,8 @@ static void _CONSTRUCTOR lib_init(void)
@@ -516,7 +538,8 @@ static void _CONSTRUCTOR lib_init(void)
}
}

Expand All @@ -150,39 +157,41 @@ index 1b372c15b..a77ea054f 100644
int ret;
const char *e;
diff --git a/lib/includes/gnutls/gnutls.h.in b/lib/includes/gnutls/gnutls.h.in
index 5840f331e..bbf932f60 100644
index c3ff442cb..743b88fbc 100644
--- a/lib/includes/gnutls/gnutls.h.in
+++ b/lib/includes/gnutls/gnutls.h.in
@@ -37,7 +37,13 @@
#define GNUTLS_GNUTLS_H
# define GNUTLS_GNUTLS_H

/* Get ssize_t. */
-# include <sys/types.h>
+#ifdef _MSC_VER
+#include <BaseTsd.h>
+typedef SSIZE_T ssize_t;
#include <sys/types.h>
+#include <sys/types.h>
+#else
+#include <sys/types.h>
+#endif

/* Get size_t. */
#include <stddef.h>
# include <stddef.h>
diff --git a/lib/system/fastopen.c b/lib/system/fastopen.c
index a904e3794..ef740c184 100644
index e60abf4aa..739e8e5ad 100644
--- a/lib/system/fastopen.c
+++ b/lib/system/fastopen.c
@@ -26,7 +26,9 @@
#include "errors.h"

#include <sys/socket.h>
+#ifndef _MSC_VER
#include <netinet/in.h> /* IPPROTO_TCP */
-#include <netinet/in.h> /* IPPROTO_TCP */
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h> /* IPPROTO_TCP */
+#endif
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/lib/x509/hostname-verify.c b/lib/x509/hostname-verify.c
index 6ef8ba030..378b29c90 100644
index c3c6a3e70..b52efd2d9 100644
--- a/lib/x509/hostname-verify.c
+++ b/lib/x509/hostname-verify.c
@@ -26,8 +26,10 @@
Expand All @@ -197,7 +206,7 @@ index 6ef8ba030..378b29c90 100644
/**
* gnutls_x509_crt_check_hostname:
diff --git a/lib/x509/ip.c b/lib/x509/ip.c
index c4cb00831..a3be0d2b0 100644
index 06d0fe90c..bf3115624 100644
--- a/lib/x509/ip.c
+++ b/lib/x509/ip.c
@@ -24,7 +24,9 @@
Expand All @@ -210,11 +219,25 @@ index c4cb00831..a3be0d2b0 100644

/*-
* _gnutls_mask_to_prefix:
diff --git a/lib/x509/verify-high2.c b/lib/x509/verify-high2.c
index 7391fa273..02558520d 100644
--- a/lib/x509/verify-high2.c
+++ b/lib/x509/verify-high2.c
@@ -494,7 +494,9 @@ int load_dir_certs(const char *dirname,
switch (d->d_type) {
case DT_REG:
case DT_LNK:
+# if DT_LNK != DT_UNKNOWN
case DT_UNKNOWN:
+# endif
break;
default:
continue;
diff --git a/lib/x509/x509_ext.c b/lib/x509/x509_ext.c
index 0b4c6a013..da2e29963 100644
index d369a4744..cf8a0d9eb 100644
--- a/lib/x509/x509_ext.c
+++ b/lib/x509/x509_ext.c
@@ -3644,7 +3644,7 @@ static const struct sct_sign_algorithm_st algos[] = {
@@ -3656,7 +3656,7 @@ static const struct sct_sign_algorithm_st algos[] = {

static gnutls_sign_algorithm_t get_sigalg(uint8_t hash_algo, uint8_t sig_algo)
{
Expand Down
Loading

0 comments on commit fc4865b

Please sign in to comment.