Date: Tue, 19 Nov 2013 16:11:03 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r258349 - head/lib/libfetch Message-ID: <201311191611.rAJGB34C075541@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery (ports committer) Date: Tue Nov 19 16:11:03 2013 New Revision: 258349 URL: http://svnweb.freebsd.org/changeset/base/258349 Log: Fix build with GCC SSL_set_tlsext_host_name(3) internally does not modify the host buffer pased to it. So it is safe to DECONST the struct url* here. Reported by: gjb Approved by: bapt (implicit) MFC after: 1 week X-MFC-With: r258347 Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Tue Nov 19 15:43:27 2013 (r258348) +++ head/lib/libfetch/common.c Tue Nov 19 16:11:03 2013 (r258349) @@ -831,7 +831,8 @@ fetch_ssl(conn_t *conn, const struct url 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)) { + if (!SSL_set_tlsext_host_name(conn->ssl, + __DECONST(struct url *, URL)->host)) { fprintf(stderr, "TLS server name indication extension failed for host %s\n", URL->host);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311191611.rAJGB34C075541>