summaryrefslogtreecommitdiff
path: root/net/libfetch
diff options
context:
space:
mode:
authorjoerg <joerg@pkgsrc.org>2014-01-07 23:30:03 +0000
committerjoerg <joerg@pkgsrc.org>2014-01-07 23:30:03 +0000
commit25a317b40fb23d7e406c7739e206b74c13424657 (patch)
tree03a8dc66aa28f27d08534e0683c43045d2b6f50a /net/libfetch
parent5139f3743a55b52d73584086681446ad08f70050 (diff)
downloadpkgsrc-25a317b40fb23d7e406c7739e206b74c13424657.tar.gz
libfetch-2.36: Support Server Name Identication.
From Michael Gmelin via FreeBSD.
Diffstat (limited to 'net/libfetch')
-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);