Date: Thu, 9 Oct 2014 12:50:55 +0000 (UTC) From: Jimmy Olgeni <olgeni@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r370521 - in head/lang/erlang: . files Message-ID: <201410091250.s99CotAe066327@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: olgeni Date: Thu Oct 9 12:50:54 2014 New Revision: 370521 URL: https://svnweb.freebsd.org/changeset/ports/370521 QAT: https://qat.redports.org/buildarchive/r370521/ Log: Fix SSL handshake when SNI-extension is empty. While I'm here: - Cleanup plist - Unmute an install command PR: 194214 Submitted by: Dave Cottlehuber Added: head/lang/erlang/files/patch-lib_ssl_src_ssl__handshake.erl (contents, props changed) head/lang/erlang/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl (contents, props changed) Modified: head/lang/erlang/Makefile head/lang/erlang/pkg-plist (contents, props changed) Modified: head/lang/erlang/Makefile ============================================================================== --- head/lang/erlang/Makefile Thu Oct 9 12:48:31 2014 (r370520) +++ head/lang/erlang/Makefile Thu Oct 9 12:50:54 2014 (r370521) @@ -3,6 +3,7 @@ PORTNAME= erlang PORTVERSION= 17.3 +PORTREVISION= 1 PORTEPOCH= 3 CATEGORIES= lang parallel java MASTER_SITES= http://www.erlang.org/download/:erlangorg \ @@ -140,7 +141,6 @@ CONFIGURE_ARGS+=--without-odbc ERLANG_MAN= otp_doc_man_${ERL_RELEASE}.tar.gz ERLANG_DOCS= otp_doc_html_${ERL_RELEASE}.tar.gz -ERLANG_PLIST= ${WRKDIR}/pkg-plist .if ${PORT_OPTIONS:MTHREADS} CONFIGURE_ARGS+=--enable-threads @@ -188,7 +188,7 @@ 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} \ @@ -203,23 +203,11 @@ post-install: @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d -empty \ | ${SORT} \ - | ${SED} -e 's#^#@exec ${MKDIR} %D/#g' \ - > ${ERLANG_PLIST} + | ${SED} -e 's#^#@dir #g' \ + >> ${TMPPLIST} @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type f -o -type l \ | ${SORT} \ - >> ${ERLANG_PLIST} - - @cd ${STAGEDIR}${PREFIX}; ${FIND} lib/${ERLANG_LIB}/* -type d \ - | ${SORT} -r \ - | ${SED} -e 's/^/@dirrm /g' \ - >> ${ERLANG_PLIST} - - @${ECHO_CMD} "r ${TMPPLIST}" > ${WRKDIR}/ex.script - @${ECHO_CMD} "/Insert PLIST here" >> ${WRKDIR}/ex.script - @${ECHO_CMD} "d" >> ${WRKDIR}/ex.script - @${ECHO_CMD} "r ${ERLANG_PLIST}" >> ${WRKDIR}/ex.script - @${ECHO_CMD} "x!" >> ${WRKDIR}/ex.script - @cd ${WRKDIR}; ex < ex.script + >> ${TMPPLIST} .include <bsd.port.mk> Added: head/lang/erlang/files/patch-lib_ssl_src_ssl__handshake.erl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/erlang/files/patch-lib_ssl_src_ssl__handshake.erl Thu Oct 9 12:50:54 2014 (r370521) @@ -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(<<?UINT16(?SNI_EXT), ?UINT16(Len), Rest/binary>>, Acc) when Len == 0 -> ++ dec_hello_extensions(Rest, Acc#hello_extensions{sni = ""}); %% Server may send an empy SNI ++ + dec_hello_extensions(<<?UINT16(?SNI_EXT), ?UINT16(Len), + ExtData:Len/binary, Rest/binary>>, Acc) -> + <<?UINT16(_), NameList/binary>> = ExtData, Added: head/lang/erlang/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lang/erlang/files/patch-lib_ssl_test_ssl__handshake__SUITE.erl Thu Oct 9 12:50:54 2014 (r370521) @@ -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 = <<?UINT16(?SNI_EXT),?UINT16(0)>>, ++ 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}), Modified: head/lang/erlang/pkg-plist ============================================================================== --- head/lang/erlang/pkg-plist Thu Oct 9 12:48:31 2014 (r370520) +++ head/lang/erlang/pkg-plist Thu Oct 9 12:50:54 2014 (r370521) @@ -9,14 +9,9 @@ bin/run_erl bin/to_erl bin/typer etc/man.d/erlang.conf -@comment Insert PLIST here -@comment -=[ begin PLIST.lib-erlang ]=- -@comment -=[ end PLIST.lib-erlang ]=- -@dirrmtry lib/%%ERLANG_LIB%% %%PORTDOCS%%%%DOCSDIR%%/armstrong_thesis_2003.pdf %%PORTDOCS%%%%DOCSDIR%%/bjarnelic.pdf %%PORTDOCS%%%%DOCSDIR%%/erlang-book-part1.pdf %%PORTDOCS%%%%DOCSDIR%%/master_thesis_patterns.pdf %%PORTDOCS%%%%DOCSDIR%%/mnesia_overview.pdf %%PORTDOCS%%%%DOCSDIR%%/programming_rules.pdf -%%PORTDOCS%%@dirrm %%DOCSDIR%%
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410091250.s99CotAe066327>