From owner-svn-ports-head@FreeBSD.ORG Thu Oct 9 12:48:32 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F31149C; Thu, 9 Oct 2014 12:48:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FFE4915; Thu, 9 Oct 2014 12:48:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s99CmWJx063532; Thu, 9 Oct 2014 12:48:32 GMT (envelope-from olgeni@FreeBSD.org) Received: (from olgeni@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s99CmVWn063529; Thu, 9 Oct 2014 12:48:31 GMT (envelope-from olgeni@FreeBSD.org) Message-Id: <201410091248.s99CmVWn063529@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: olgeni set sender to olgeni@FreeBSD.org using -f From: Jimmy Olgeni Date: Thu, 9 Oct 2014 12:48:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r370520 - in head/lang/erlang-runtime17: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Oct 2014 12:48:32 -0000 Author: olgeni Date: Thu Oct 9 12:48:31 2014 New Revision: 370520 URL: https://svnweb.freebsd.org/changeset/ports/370520 QAT: https://qat.redports.org/buildarchive/r370520/ Log: Fix SSL handshake when SNI-extension is empty. While I'm here: - Reduce diff with the main Erlang port - Do not mute install commands PR: 194214 Submitted by: Dave Cottlehuber Added: head/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__handshake.erl (contents, props changed) head/lang/erlang-runtime17/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl (contents, props changed) Modified: head/lang/erlang-runtime17/Makefile Modified: head/lang/erlang-runtime17/Makefile ============================================================================== --- head/lang/erlang-runtime17/Makefile Thu Oct 9 12:38:54 2014 (r370519) +++ head/lang/erlang-runtime17/Makefile Thu Oct 9 12:48:31 2014 (r370520) @@ -3,6 +3,7 @@ PORTNAME= erlang PORTVERSION= 17.3 +PORTREVISION= 1 CATEGORIES= lang parallel java MASTER_SITES= http://www.erlang.org/download/:erlangorg \ http://erlang.stacken.kth.se/download/:erlangorg \ @@ -37,7 +38,7 @@ SCTP_DESC= Enable SCTP support SMP_DESC= Enable SMP support WX_DESC= Enable WX application GS_DESC= Enable GS application (deprecated) -DTRACE_DESC= Enable DTrace support (experimental) +DTRACE_DESC= Enable DTrace support OPTIONS_DEFAULT=SMP OPENSSL THREADS SCTP KQUEUE @@ -62,9 +63,11 @@ DISTFILES+= ${ERLANG_DOCS}:erlangorg # probes fixed does not match the number of defined probes (54 != 132, # respectively)" you probably misconfigured DTrace in some way. +.if ${OSVERSION} < 1000000 .if ${ARCH} == "amd64" && ${PORT_OPTIONS:MDTRACE} && ! ${PORT_OPTIONS:MGCC} IGNORE= DTRACE support on amd64 requires GCC option .endif +.endif .if ${PORT_OPTIONS:MGCC} USE_GCC?= yes @@ -165,12 +168,12 @@ post-install: -C ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB} \ "man/man$${SECTION}/*.$${SECTION}" || ${TRUE}; \ done - @${RM} -rf ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/man/cat? + ${RM} -rf ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/man/cat? .if ${PORT_OPTIONS:MDOCS} - @${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_DOCS} \ + ${TAR} --unlink -xzpf ${DISTDIR}/${DIST_SUBDIR}/${ERLANG_DOCS} \ -C ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB} - @${INSTALL_DATA} ${WRKSRC}/lib/dialyzer/doc/*.txt \ + ${INSTALL_DATA} ${WRKSRC}/lib/dialyzer/doc/*.txt \ ${STAGEDIR}${PREFIX}/lib/${ERLANG_LIB}/lib/dialyzer-*/doc/ .endif Added: head/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__handshake.erl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/erlang-runtime17/files/patch-lib_ssl_src_ssl__handshake.erl Thu Oct 9 12:48:31 2014 (r370520) @@ -0,0 +1,15 @@ + +$FreeBSD$ + +--- lib/ssl/src/ssl_handshake.erl.orig ++++ lib/ssl/src/ssl_handshake.erl +@@ -1732,6 +1732,9 @@ + #ec_point_formats{ec_point_format_list = + ECPointFormats}}); + ++dec_hello_extensions(<>, Acc) when Len == 0 -> ++ dec_hello_extensions(Rest, Acc#hello_extensions{sni = ""}); %% Server may send an empy SNI ++ + dec_hello_extensions(<>, Acc) -> + <> = ExtData, Added: head/lang/erlang-runtime17/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/erlang-runtime17/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl Thu Oct 9 12:48:31 2014 (r370520) @@ -0,0 +1,27 @@ + +$FreeBSD$ + +--- lib/ssl/test/ssl_handshake_SUITE.erl.orig ++++ lib/ssl/test/ssl_handshake_SUITE.erl +@@ -39,6 +39,7 @@ + decode_unknown_hello_extension_correctly, + encode_single_hello_sni_extension_correctly, + decode_single_hello_sni_extension_correctly, ++ decode_empty_server_sni_correctly, + select_proper_tls_1_2_rsa_default_hashsign]. + + %%-------------------------------------------------------------------- +@@ -106,6 +107,13 @@ + Decoded = ssl_handshake:decode_hello_extensions(SNI), + Exts = Decoded. + ++decode_empty_server_sni_correctly(_Config) -> ++ Exts = #hello_extensions{sni = ""}, ++ SNI = <>, ++ Decoded = ssl_handshake:decode_hello_extensions(SNI), ++ Exts = Decoded. ++ ++ + select_proper_tls_1_2_rsa_default_hashsign(_Config) -> + % RFC 5246 section 7.4.1.4.1 tells to use {sha1,rsa} as default signature_algorithm for RSA key exchanges + {sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,3}),