#1 Update to gnutls 3.6.3
Merged 5 years ago by rjones. Opened 5 years ago by teuf.
rpms/ teuf/mingw-gnutls master  into  master

@@ -0,0 +1,12 @@ 

+ diff -up gnutls-3.4.2/guile/src/Makefile.in.jx gnutls-3.4.2/guile/src/Makefile.in

+ --- gnutls-3.4.2/guile/src/Makefile.in.jx	2015-06-16 12:23:31.000000000 -0400

+ +++ gnutls-3.4.2/guile/src/Makefile.in	2015-07-02 14:01:19.415060204 -0400

+ @@ -1316,7 +1316,7 @@ guileextension_LTLIBRARIES = guile-gnutl

+  # Use '-module' to build a "dlopenable module", in Libtool terms.

+  # Use '-undefined' to placate Libtool on Windows; see

+  # <http://lists.gnutls.org/pipermail/gnutls-devel/2014-December/007294.html>.

+ -guile_gnutls_v_2_la_LDFLAGS = -module -no-undefined

+ +guile_gnutls_v_2_la_LDFLAGS = -module -no-undefined -Wl,-z,lazy

+  

+  # Linking against GnuTLS.

+  GNUTLS_CORE_LIBS = $(top_builddir)/lib/libgnutls.la

@@ -0,0 +1,55 @@ 

+ diff --git a/lib/cert-cred.c b/lib/cert-cred.c

+ index d3777e51f..2150e903f 100644

+ --- a/lib/cert-cred.c

+ +++ b/lib/cert-cred.c

+ @@ -387,6 +387,13 @@ static int call_legacy_cert_cb1(gnutls_session_t session,

+  	if (ret < 0)

+  		return gnutls_assert_val(ret);

+  

+ +	if (st2.ncerts == 0) {

+ +		*pcert_length = 0;

+ +		*ocsp_length = 0;

+ +		*privkey = NULL;

+ +		return 0;

+ +	}

+ +

+  	if (st2.cert_type != GNUTLS_CRT_X509) {

+  		gnutls_assert();

+  		ret = GNUTLS_E_INVALID_REQUEST;

+ @@ -503,7 +510,10 @@ void gnutls_certificate_set_retrieve_function

+       gnutls_certificate_retrieve_function * func)

+  {

+  	cred->legacy_cert_cb1 = func;

+ -	cred->get_cert_callback3 = call_legacy_cert_cb1;

+ +	if (!func)

+ +		cred->get_cert_callback3 = NULL;

+ +	else

+ +		cred->get_cert_callback3 = call_legacy_cert_cb1;

+  }

+  

+  static int call_legacy_cert_cb2(gnutls_session_t session,

+ @@ -578,7 +588,10 @@ void gnutls_certificate_set_retrieve_function2

+       gnutls_certificate_retrieve_function2 * func) 

+  {

+  	cred->legacy_cert_cb2 = func;

+ -	cred->get_cert_callback3 = call_legacy_cert_cb2;

+ +	if (!func)

+ +		cred->get_cert_callback3 = NULL;

+ +	else

+ +		cred->get_cert_callback3 = call_legacy_cert_cb2;

+  }

+  

+  /**

+ diff --git a/lib/hello_ext.c b/lib/hello_ext.c

+ index a3027130a..f72afe77f 100644

+ --- a/lib/hello_ext.c

+ +++ b/lib/hello_ext.c

+ @@ -208,7 +208,7 @@ int hello_ext_parse(void *_ctx, unsigned tls_id, const uint8_t *data, unsigned d

+  

+  	if (tls_id == PRE_SHARED_KEY_TLS_ID) {

+  		ctx->seen_pre_shared_key = 1;

+ -	} else if (ctx->seen_pre_shared_key) {

+ +	} else if (ctx->seen_pre_shared_key && session->security_parameters.entity == GNUTLS_SERVER) {

+  		/* the pre-shared key extension must always be the last one,

+  		 * draft-ietf-tls-tls13-28: 4.2.11 */

+  		return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);

@@ -0,0 +1,27 @@ 

+ diff --git a/lib/pubkey.c b/lib/pubkey.c

+ index 162ceaa4a..8fc42b95a 100644

+ --- a/lib/pubkey.c

+ +++ b/lib/pubkey.c

+ @@ -1072,7 +1072,6 @@ gnutls_pubkey_import(gnutls_pubkey_t key,

+  	int result = 0, need_free = 0;

+  	gnutls_datum_t _data;

+  	ASN1_TYPE spk;

+ -	gnutls_ecc_curve_t curve;

+  

+  	if (key == NULL) {

+  		gnutls_assert();

+ @@ -1119,14 +1118,7 @@ gnutls_pubkey_import(gnutls_pubkey_t key,

+  		goto cleanup;

+  	}

+  

+ -	/* this has already been called by get_asn_mpis() thus it cannot

+ -	 * fail.

+ -	 */

+ -	key->params.algo = _gnutls_x509_get_pk_algorithm(spk, "", &curve, NULL);

+ -

+ -	key->params.curve = curve;

+  	key->bits = pubkey_to_bits(&key->params);

+ -

+  	result = 0;

+  

+        cleanup:

@@ -0,0 +1,12 @@ 

+ diff --git a/src/cli.c b/src/cli.c

+ index 21be015dc..42d027736 100644

+ --- a/src/cli.c

+ +++ b/src/cli.c

+ @@ -1273,7 +1273,6 @@ int main(int argc, char **argv)

+  				}

+  				continue;

+  			}

+ -			bytes=strlen(buffer);

+  			buffer[bytes] = 0;

+  

+  			if (crlf != 0) {

@@ -0,0 +1,65 @@ 

+ diff --git a/lib/handshake.c b/lib/handshake.c

+ index ebea926aa..8dce170fe 100644

+ --- a/lib/handshake.c

+ +++ b/lib/handshake.c

+ @@ -248,6 +248,7 @@ int _gnutls_set_server_random(gnutls_session_t session, const version_entry_st *

+  	memcpy(session->security_parameters.server_random, rnd,

+  	       GNUTLS_RANDOM_SIZE);

+  

+ +#if 0 /* This was not supposed to be checked in draft-versions */

+  	/* check whether the server random value is set according to

+  	 * to TLS 1.3. p4.1.3 requirements */

+  	if (!IS_DTLS(session) && vers->id <= GNUTLS_TLS1_2 && have_creds_for_tls13(session)) {

+ @@ -272,6 +273,7 @@ int _gnutls_set_server_random(gnutls_session_t session, const version_entry_st *

+  			return gnutls_assert_val(GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER);

+  		}

+  	}

+ +#endif

+  

+  	return 0;

+  }

+ @@ -291,6 +293,7 @@ int _gnutls_gen_server_random(gnutls_session_t session, int version)

+  

+  	max = _gnutls_version_max(session);

+  

+ +#if 0

+  	if (!IS_DTLS(session) && max->id >= GNUTLS_TLS1_3 &&

+  	    version <= GNUTLS_TLS1_2) {

+  		if (version == GNUTLS_TLS1_2) {

+ @@ -303,7 +306,9 @@ int _gnutls_gen_server_random(gnutls_session_t session, int version)

+  		ret =

+  		    gnutls_rnd(GNUTLS_RND_NONCE, session->security_parameters.server_random, GNUTLS_RANDOM_SIZE-8);

+  

+ -	} else {

+ +	} else

+ +#endif

+ +	{

+  		ret =

+  		    gnutls_rnd(GNUTLS_RND_NONCE, session->security_parameters.server_random, GNUTLS_RANDOM_SIZE);

+  	}

+ diff --git a/tests/tls13/rnd-check-rollback-val.c b/tests/tls13/rnd-check-rollback-val.c

+ index f573596c5..6934b2507 100644

+ --- a/tests/tls13/rnd-check-rollback-val.c

+ +++ b/tests/tls13/rnd-check-rollback-val.c

+ @@ -222,6 +222,8 @@ void doit(void)

+  	int ret;

+  	pid_t child;

+  

+ +	exit(77);

+ +

+  	signal(SIGCHLD, ch_handler);

+  	signal(SIGPIPE, SIG_IGN);

+  

+ diff --git a/tests/tls13/rnd-rollback-detection.c b/tests/tls13/rnd-rollback-detection.c

+ index 0d1ef0149..8cbb658cf 100644

+ --- a/tests/tls13/rnd-rollback-detection.c

+ +++ b/tests/tls13/rnd-rollback-detection.c

+ @@ -206,6 +206,8 @@ void doit(void)

+  	int ret;

+  	pid_t child;

+  

+ +	exit(77);

+ +

+  	signal(SIGCHLD, ch_handler);

+  	signal(SIGPIPE, SIG_IGN);

+  

@@ -0,0 +1,30 @@ 

+ diff --git a/tests/priority-init2.c b/tests/priority-init2.c

+ index 850a6d9..d6b7659 100644

+ --- a/tests/priority-init2.c

+ +++ b/tests/priority-init2.c

+ @@ -91,8 +91,8 @@ static void start(struct test_st *test)

+  		if (test->exp_err == ret) {

+  			if (ep-test->add_prio != test->err_pos) {

+  				fprintf(stderr, "diff: %d\n", (int)(ep-test->add_prio));

+ -				fail("error expected error on different position[%d]: %s\n",

+ -					test->err_pos, test->add_prio);

+ +//				fail("error expected error on different position[%d]: %s\n",

+ +//					test->err_pos, test->add_prio);

+  			}

+  			goto cleanup;

+  		}

+ diff --git a/tests/set-default-prio.c b/tests/set-default-prio.c

+ index 48e8bf1..16235f8 100644

+ --- a/tests/set-default-prio.c

+ +++ b/tests/set-default-prio.c

+ @@ -90,8 +90,8 @@ static void start(struct test_st *test)

+  		if (test->exp_err == ret) {

+  			if (ep-test->add_prio != test->err_pos) {

+  				fprintf(stderr, "diff: %d\n", (int)(ep-test->add_prio));

+ -				fail("error expected error on different position[%d]: %s\n",

+ -					test->err_pos, test->add_prio);

+ +//				fail("error expected error on different position[%d]: %s\n",

+ +//					test->err_pos, test->add_prio);

+  			}

+  			goto cleanup;

+  		}

file modified
+23 -7
@@ -1,8 +1,8 @@ 

  %?mingw_package_header

  

  Name:           mingw-gnutls

- Version:        3.6.2

- Release:        2%{?dist}

+ Version:        3.6.3

+ Release:        1%{?dist}

  Summary:        MinGW GnuTLS TLS/SSL encryption library

  

  # The libraries are LGPLv2.1+, utilities are GPLv3+
@@ -16,6 +16,12 @@ 

  BuildArch:      noarch

  

  Patch1: gnutls-3.2.7-rpath.patch

+ Patch2: gnutls-3.4.2-no-now-guile.patch

+ Patch3: gnutls-3.6.3-skip-new-priority-funcs-err-pos.patch

+ Patch4: gnutls-3.6.3-backport-upstream-fixes.patch

+ Patch5: gnutls-3.6.3-fix-ecdsa.patch

+ Patch6: gnutls-3.6.3-gnutls-cli-fix.patch

+ Patch7: gnutls-3.6.3-rollback-fix.patch

  

  # MinGW-specific patches.

  Patch1000:      gnutls-fix-external-libtasn1-detection.patch
@@ -85,25 +91,32 @@ 

  %setup -q -n gnutls-%{version}

  

  %patch1 -p1 -b .rpath

+ %patch2 -p1

+ %patch3 -p1

+ %patch4 -p1

+ %patch5 -p1

+ %patch6 -p1

+ %patch7 -p1

  

  %patch1000 -p0 -b .libtasn1

  rm -f lib/minitasn1/*.c lib/minitasn1/*.h

  

- 

  %build

  autoreconf -f

  %mingw_configure                   \

      --disable-static               \

      --disable-openssl-compatibility \

-     --disable-nls \

+     --disable-non-suiteb-curves \

+     --disable-libdane \

      --disable-rpath \

+     --disable-nls \

      --disable-cxx \

-     --disable-libdane \

-     --disable-non-suiteb-curves \

      --enable-local-libopts \

      --enable-shared \

      --without-tpm \

-     --with-included-unistring

+     --with-included-unistring \

+     --disable-doc \

+     --with-default-priority-string="@SYSTEM"

  

  %mingw_make %{?_smp_mflags}

  
@@ -169,6 +182,9 @@ 

  

  

  %changelog

+ * Mon Aug 27 2018 Christophe Fergeau <cfergeau@redhat.com> - 3.6.3-1

+ - Update to 3.6.3 and sync patches with rawhide native package

+ 

  * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.6.2-2

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

  

file modified
+2 -2
@@ -1,3 +1,3 @@ 

  SHA512 (gpgkey-1F42418905D8206AA754CCDC29EE58B996865171.gpg) = 3b1989dc6a64d1140f83a2af0773da2adb03c50d97b6da7357cf09525050651aafa21131f1e3180baa540a8af922119a256f5ff5bcd6602996a806e8e1816bad

- SHA512 (gnutls-3.6.2.tar.xz) = 6a574d355226bdff6198ab3f70633ff2a3cff4b5d06793bdaf19d007063bd4dd515d1bd3f331a9eb1a9ad01f83007801cfa55e5fd16c1cd3461ac33d1813fb06

- SHA512 (gnutls-3.6.2.tar.xz.sig) = a1fc8acd0b48d046eda505b774e5e1a85dce8c8b2122069e6d257a50436e989cfdbc68aa294d14f98e3fec1ade129e8bd9b67b1d02f93a7a3fde5f5acb4b70d3

+ SHA512 (gnutls-3.6.3.tar.xz.sig) = 5377352aa239a4458b0ac6aaada438dce0336b989c4f65949fec3e469531dfb2397bb36dbe69dbc6f479f6944999937ebb4a5cb40e806d0bd4062c5647aa397b

+ SHA512 (gnutls-3.6.3.tar.xz) = 6238502464d229a9777e3076f4c745d16deaada83c9da756ecdcd370947576e0446bda3a7f85d5a099b745bbf8c0134ebdf6632e4b26d61daf170792fb4f5abe