From owner-svn-ports-all@freebsd.org Fri Oct 23 22:48:36 2015 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 75DC3A1D247; Fri, 23 Oct 2015 22:48:36 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::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 47432AA1; Fri, 23 Oct 2015 22:48:36 +0000 (UTC) (envelope-from danilo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9NMmZLW044994; Fri, 23 Oct 2015 22:48:35 GMT (envelope-from danilo@FreeBSD.org) Received: (from danilo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9NMmYaL044984; Fri, 23 Oct 2015 22:48:34 GMT (envelope-from danilo@FreeBSD.org) Message-Id: <201510232248.t9NMmYaL044984@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: danilo set sender to danilo@FreeBSD.org using -f From: Danilo Egea Gondolfo Date: Fri, 23 Oct 2015 22:48:34 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r400062 - in head/security: . s2n s2n/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-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Oct 2015 22:48:36 -0000 Author: danilo Date: Fri Oct 23 22:48:34 2015 New Revision: 400062 URL: https://svnweb.freebsd.org/changeset/ports/400062 Log: - New port: security/s2n s2n is a C99 implementation of the TLS/SSL protocols that is designed to be simple, small, fast, and with security as a priority. It is released and licensed under the Apache Software License 2.0. WWW: https://github.com/awslabs/s2n Added: head/security/s2n/ head/security/s2n/Makefile (contents, props changed) head/security/s2n/distinfo (contents, props changed) head/security/s2n/files/ head/security/s2n/files/Makefile.in (contents, props changed) head/security/s2n/files/extra-patch-tls_s2n__connection.c (contents, props changed) head/security/s2n/files/pkg-message.in (contents, props changed) head/security/s2n/pkg-descr (contents, props changed) head/security/s2n/pkg-plist (contents, props changed) Modified: head/security/Makefile Modified: head/security/Makefile ============================================================================== --- head/security/Makefile Fri Oct 23 21:48:13 2015 (r400061) +++ head/security/Makefile Fri Oct 23 22:48:34 2015 (r400062) @@ -963,6 +963,7 @@ SUBDIR += rubygem-sshkey SUBDIR += rubygem-sshkit SUBDIR += rubygem-twitter_oauth + SUBDIR += s2n SUBDIR += safesh SUBDIR += samba-virusfilter SUBDIR += sancp Added: head/security/s2n/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/Makefile Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,56 @@ +# Created by: Danilo Egea Gondolfo +# $FreeBSD$ + +PORTNAME= s2n +PORTVERSION= 20150909 +CATEGORIES= security + +MAINTAINER= danilo@FreeBSD.org +COMMENT= C99 implementation of the TLS/SSL protocols + +LICENSE= APACHE20 + +USE_GITHUB= yes +GH_ACCOUNT= awslabs +GH_PROJECT= s2n +GH_TAGNAME= 674df33 + +OPTIONS_DEFINE= DOCS EXAMPLES + +USES= gmake +USE_LDCONFIG= yes +NO_CONFIGURE= yes + +SUB_FILES= pkg-message Makefile +ALL_TARGET= bin + +.include + +.if ${OSVERSION} < 1000015 +WITH_OPENSSL_PORT= yes +.include "${PORTSDIR}/Mk/bsd.openssl.mk" +CFLAGS+= -I${LOCALBASE}/include -L${LOCALBASE}/lib +# Actually used on 9 to build with gcc +EXTRA_PATCHES= ${FILESDIR}/extra-patch-tls_s2n__connection.c +.endif + +post-patch: + @${REINPLACE_CMD} -e 's|CFLAGS |&+|' ${WRKSRC}/s2n.mk + @${REINPLACE_CMD} -e 's|CRYPTO_LDFLAGS |&+|' \ + ${WRKSRC}/tests/testlib/Makefile \ + ${WRKSRC}/tests/unit/Makefile + +do-install: + ${INSTALL_LIB} ${WRKSRC}/lib/libs2n.so* ${STAGEDIR}${LOCALBASE}/lib + ${LN} -s libs2n.so ${STAGEDIR}${LOCALBASE}/lib/libs2n.so.0 + ${INSTALL_DATA} ${WRKSRC}/api/s2n* ${STAGEDIR}${LOCALBASE}/include + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${CP} -r ${WRKSRC}/docs/* ${STAGEDIR}${DOCSDIR} + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKSRC}/bin/*.c ${STAGEDIR}${EXAMPLESDIR} + ${INSTALL_DATA} ${WRKDIR}/Makefile ${STAGEDIR}${EXAMPLESDIR} + +tests: build + ${GMAKE} PLATFORM=FreeBSD CRYPTO_LDFLAGS=-L${LOCALBASE}/lib -C ${WRKSRC}/tests + +.include Added: head/security/s2n/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/distinfo Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,2 @@ +SHA256 (awslabs-s2n-20150909-674df33_GH0.tar.gz) = 25bf788ab8fee9e364bf52a1ab03ff809c3706eaff54f4586ccff405f4ce0788 +SIZE (awslabs-s2n-20150909-674df33_GH0.tar.gz) = 460084 Added: head/security/s2n/files/Makefile.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/files/Makefile.in Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,5 @@ +CFLAGS+= -I%%PREFIX%%/include +LDFLAGS+= -L%%PREFIX%%/lib -ls2n -lcrypto +all: + ${CC} -o s2nd echo.c s2nd.c ${CFLAGS} ${LDFLAGS} + ${CC} -o s2nc echo.c s2nc.c ${CFLAGS} ${LDFLAGS} Added: head/security/s2n/files/extra-patch-tls_s2n__connection.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/files/extra-patch-tls_s2n__connection.c Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,22 @@ +--- tls/s2n_connection.c.orig 2015-10-22 22:11:14 UTC ++++ tls/s2n_connection.c +@@ -192,8 +192,8 @@ int s2n_connection_wipe(struct s2n_conne + + /* Clone the stuffers */ + /* ignore gcc 4.7 address warnings because dest is allocated on the stack */ +-#pragma GCC diagnostic push +-#pragma GCC diagnostic ignored "-Waddress" ++//#pragma GCC diagnostic push ++//#pragma GCC diagnostic ignored "-Waddress" + memcpy_check(&alert_in, &conn->alert_in, sizeof(struct s2n_stuffer)); + memcpy_check(&reader_alert_out, &conn->reader_alert_out, sizeof(struct s2n_stuffer)); + memcpy_check(&writer_alert_out, &conn->writer_alert_out, sizeof(struct s2n_stuffer)); +@@ -201,7 +201,7 @@ int s2n_connection_wipe(struct s2n_conne + memcpy_check(&header_in, &conn->header_in, sizeof(struct s2n_stuffer)); + memcpy_check(&in, &conn->in, sizeof(struct s2n_stuffer)); + memcpy_check(&out, &conn->out, sizeof(struct s2n_stuffer)); +-#pragma GCC diagnostic pop ++//#pragma GCC diagnostic pop + + /* Zero the whole connection structure */ + memset_check(conn, 0, sizeof(struct s2n_connection)); Added: head/security/s2n/files/pkg-message.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/files/pkg-message.in Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,7 @@ +====================================================================== + +If s2n fails due mlock(2) syscall try to increase vm.max_wired. +Example: + - sysctl vm.max_wired=1572864 + +====================================================================== Added: head/security/s2n/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/pkg-descr Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,5 @@ +s2n is a C99 implementation of the TLS/SSL protocols that +is designed to be simple, small, fast, and with security as +a priority. It is released and licensed under the Apache Software License 2.0. + +WWW: https://github.com/awslabs/s2n Added: head/security/s2n/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/security/s2n/pkg-plist Fri Oct 23 22:48:34 2015 (r400062) @@ -0,0 +1,15 @@ +include/s2n.h +lib/libs2n.so +lib/libs2n.so.0 +%%PORTDOCS%%%%DOCSDIR%%/BINDINGS.md +%%PORTDOCS%%%%DOCSDIR%%/DEVELOPMENT-GUIDE.md +%%PORTDOCS%%%%DOCSDIR%%/READING-LIST.md +%%PORTDOCS%%%%DOCSDIR%%/USAGE-GUIDE.md +%%PORTDOCS%%%%DOCSDIR%%/images/s2n_lambda.png +%%PORTDOCS%%%%DOCSDIR%%/images/s2n_logo_github.png +%%PORTDOCS%%%%DOCSDIR%%/images/s2n_stuffer_layout.png +%%PORTDOCS%%%%DOCSDIR%%/images/s2n_tls_layers.png +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/Makefile +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/echo.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/s2nc.c +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/s2nd.c