summaryrefslogtreecommitdiff
path: root/source/n/gnutls
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/gnutls')
-rw-r--r--source/n/gnutls/gnutls-3.6.3-backport-upstream-fixes.patch55
-rwxr-xr-xsource/n/gnutls/gnutls.SlackBuild8
2 files changed, 62 insertions, 1 deletions
diff --git a/source/n/gnutls/gnutls-3.6.3-backport-upstream-fixes.patch b/source/n/gnutls/gnutls-3.6.3-backport-upstream-fixes.patch
new file mode 100644
index 00000000..a7aad333
--- /dev/null
+++ b/source/n/gnutls/gnutls-3.6.3-backport-upstream-fixes.patch
@@ -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);
diff --git a/source/n/gnutls/gnutls.SlackBuild b/source/n/gnutls/gnutls.SlackBuild
index 331b9b94..11320730 100755
--- a/source/n/gnutls/gnutls.SlackBuild
+++ b/source/n/gnutls/gnutls.SlackBuild
@@ -24,7 +24,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PKGNAM=gnutls
VERSION=${VERSION:-$(echo gnutls-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
@@ -60,6 +60,9 @@ else
LIBDIRSUFFIX=""
fi
+# Don't use icecream:
+PATH=$(echo $PATH | sed "s|/usr/libexec/icecc/bin||g" | tr -s : | sed "s/^://g" | sed "s/:$//g")
+
TMP=${TMP:-/tmp}
PKG=$TMP/package-$PKGNAM
rm -rf $PKG
@@ -78,6 +81,9 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
+# This patch addresses some issues with SSL/TLS breakage in 3.6.3:
+zcat $CWD/gnutls-3.6.3-backport-upstream-fixes.patch.gz | patch -p1 --verbose || exit 1
+
# Need to reconf to find guile-2.2.x:
autoreconf -vif