summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorjoerg <joerg>2014-01-07 23:30:03 +0000
committerjoerg <joerg>2014-01-07 23:30:03 +0000
commit0aa0279be6c7a2b464b305b324c8cfc410ad0548 (patch)
tree03a8dc66aa28f27d08534e0683c43045d2b6f50a /net
parentf7843672c1f5d72b02b9a00a1127cba219901ead (diff)
downloadpkgsrc-0aa0279be6c7a2b464b305b324c8cfc410ad0548.tar.gz
libfetch-2.36: Support Server Name Identication.
From Michael Gmelin via FreeBSD.
Diffstat (limited to 'net')
-rw-r--r--net/libfetch/Makefile4
-rw-r--r--net/libfetch/files/common.c10
2 files changed, 11 insertions, 3 deletions
diff --git a/net/libfetch/Makefile b/net/libfetch/Makefile
index 29549565fd6..8be5637d2a3 100644
--- a/net/libfetch/Makefile
+++ b/net/libfetch/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.49 2014/01/07 23:25:12 joerg Exp $
+# $NetBSD: Makefile,v 1.50 2014/01/07 23:30:03 joerg Exp $
#
-DISTNAME= libfetch-2.35
+DISTNAME= libfetch-2.36
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
diff --git a/net/libfetch/files/common.c b/net/libfetch/files/common.c
index 48fba41e5b5..01156f98ff6 100644
--- a/net/libfetch/files/common.c
+++ b/net/libfetch/files/common.c
@@ -1,4 +1,4 @@
-/* $NetBSD: common.c,v 1.27 2010/06/13 21:38:09 joerg Exp $ */
+/* $NetBSD: common.c,v 1.28 2014/01/07 23:30:03 joerg Exp $ */
/*-
* Copyright (c) 1998-2004 Dag-Erling Coïdan Smørgrav
* Copyright (c) 2008, 2010 Joerg Sonnenberger <joerg@NetBSD.org>
@@ -453,6 +453,14 @@ fetch_ssl(conn_t *conn, int verbose)
return (-1);
}
SSL_set_fd(conn->ssl, conn->sd);
+#if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
+ if (!SSL_set_tlsext_host_name(conn->ssl, URL->host)) {
+ fprintf(stderr,
+ "TLS server name indication extension failed for host %s\n",
+ URL->host);
+ return (-1);
+ }
+#endif
if (SSL_connect(conn->ssl) == -1){
ERR_print_errors_fp(stderr);
return (-1);