From owner-svn-ports-all@freebsd.org Tue Sep 29 10:10:52 2020 Return-Path: Delivered-To: svn-ports-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0996E3FC7FF; Tue, 29 Sep 2020 10:10:52 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C0wBg67yXz4ZN0; Tue, 29 Sep 2020 10:10:51 +0000 (UTC) (envelope-from adamw@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B601ECCC6; Tue, 29 Sep 2020 10:10:51 +0000 (UTC) (envelope-from adamw@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 08TAAp44080967; Tue, 29 Sep 2020 10:10:51 GMT (envelope-from adamw@FreeBSD.org) Received: (from adamw@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 08TAApAJ080964; Tue, 29 Sep 2020 10:10:51 GMT (envelope-from adamw@FreeBSD.org) Message-Id: <202009291010.08TAApAJ080964@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adamw set sender to adamw@FreeBSD.org using -f From: Adam Weinberger Date: Tue, 29 Sep 2020 10:10:51 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r550490 - in head/security/testssl.sh: . files X-SVN-Group: ports-head X-SVN-Commit-Author: adamw X-SVN-Commit-Paths: in head/security/testssl.sh: . files X-SVN-Commit-Revision: 550490 X-SVN-Commit-Repository: ports 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.33 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: Tue, 29 Sep 2020 10:10:52 -0000 Author: adamw Date: Tue Sep 29 10:10:50 2020 New Revision: 550490 URL: https://svnweb.freebsd.org/changeset/ports/550490 Log: security/testssl.sh: Turn REINPLACEs into patches While here, improve some text strings and general formatting. Modified: head/security/testssl.sh/Makefile head/security/testssl.sh/files/patch-testssl.sh head/security/testssl.sh/pkg-descr Modified: head/security/testssl.sh/Makefile ============================================================================== --- head/security/testssl.sh/Makefile Tue Sep 29 09:41:41 2020 (r550489) +++ head/security/testssl.sh/Makefile Tue Sep 29 10:10:50 2020 (r550490) @@ -5,45 +5,40 @@ DISTVERSION= 3.0.2 CATEGORIES= security MAINTAINER= adamw@FreeBSD.org -COMMENT= Test TLS/SSL encryption anywhere on any port +COMMENT= Analyze and report TLS/SSL configuration/misconfiguration LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= ${LOCALBASE}/openssl-unsafe/bin/openssl:security/openssl-unsafe \ +RUN_DEPENDS= openssl-unsafe>=1.0.1:security/openssl-unsafe \ bash:shells/bash TEST_DEPENDS= p5-JSON>=0:converters/p5-JSON USES= perl5 shebangfix USE_GITHUB= yes GH_ACCOUNT= drwetter -USE_PERL5= test + SHEBANG_FILES= testssl.sh utils/* + +USE_PERL5= test TEST_ENV= TESTSSL_INSTALL_DIR=${WRKSRC} NO_ARCH= yes NO_BUILD= yes post-patch: - @${REINPLACE_CMD} -e '/elif test_openssl_suffix/d' \ - -e 's@OPENSSL=PREFIX@OPENSSL=${PREFIX}@' \ - -e 's@$${TESTSSL_INSTALL_DIR:-""}@$${TESTSSL_INSTALL_DIR:-"${DATADIR}"}@' \ - -e '/check_bsd_mount$$/d' \ + ${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|; s|%%DATADIR%%|${DATADIR}|' \ ${WRKSRC}/testssl.sh do-install: - ${INSTALL_SCRIPT} ${WRKSRC}/testssl.sh \ - ${STAGEDIR}${PREFIX}/bin - ${INSTALL_MAN} ${WRKSRC}/doc/testssl.1 \ - ${STAGEDIR}${MAN1PREFIX}/man/man1 - @cd ${WRKSRC} && \ - ${COPYTREE_SHARE} "etc utils" ${STAGEDIR}${DATADIR} + ${INSTALL_SCRIPT} ${WRKSRC}/testssl.sh ${STAGEDIR}${PREFIX}/bin + ${INSTALL_MAN} ${WRKSRC}/doc/testssl.1 ${STAGEDIR}${MAN1PREFIX}/man/man1 + cd ${WRKSRC} && ${COPYTREE_SHARE} "etc utils" ${STAGEDIR}${DATADIR} do-test: # Run the badssl.com test as a sanity check. The full test suite # opens too many network connections and might take too long to # run. - @cd ${WRKSRC} && \ - ${SETENV} ${TEST_ENV} prove -v t/51_badssl.com.t + cd ${WRKSRC} && ${SETENV} ${TEST_ENV} prove -v t/51_badssl.com.t .include Modified: head/security/testssl.sh/files/patch-testssl.sh ============================================================================== --- head/security/testssl.sh/files/patch-testssl.sh Tue Sep 29 09:41:41 2020 (r550489) +++ head/security/testssl.sh/files/patch-testssl.sh Tue Sep 29 10:10:50 2020 (r550490) @@ -1,12 +1,29 @@ ---- testssl.sh.orig 2019-12-11 11:41:31 UTC +--- testssl.sh.orig 2020-09-29 09:50:09 UTC +++ testssl.sh -@@ -190,6 +190,9 @@ TERM_CURRPOS=0 +@@ -132,7 +132,7 @@ declare -r RUN_DIR="$(dirname "$0")" + declare -r SYSTEM="$(uname -s)" + declare -r SYSTEMREV="$(uname -r)" + SYSTEM2="" # currently only being used for WSL = bash on windows +-TESTSSL_INSTALL_DIR="${TESTSSL_INSTALL_DIR:-""}" # If you run testssl.sh and it doesn't find it necessary file automagically set TESTSSL_INSTALL_DIR ++TESTSSL_INSTALL_DIR="${TESTSSL_INSTALL_DIR:-"%%DATADIR%%"}" # If you run testssl.sh and it doesn't find it necessary file automagically set TESTSSL_INSTALL_DIR + CA_BUNDLES_PATH="${CA_BUNDLES_PATH:-""}" # You can have your stores some place else + ADDITIONAL_CA_FILES="${ADDITIONAL_CA_FILES:-""}" # single file with a CA in PEM format or comma separated lists of them + CIPHERS_BY_STRENGTH_FILE="" +@@ -187,6 +187,9 @@ TERM_CURRPOS=0 ########### Defining (and presetting) variables which can be changed # # Following variables make use of $ENV and can be used like "OPENSSL= ./testssl.sh " -+if [[ -z "$OPENSSL" ]] ; then -+ OPENSSL=PREFIX/openssl-unsafe/bin/openssl ++if [[ -z "$OPENSSL" ]]; then ++ OPENSSL=%%PREFIX%%/openssl-unsafe/bin/openssl +fi declare -x OPENSSL OPENSSL_TIMEOUT=${OPENSSL_TIMEOUT:-""} # Default connect timeout with openssl before we call the server side unreachable CONNECT_TIMEOUT=${CONNECT_TIMEOUT:-""} # Default connect timeout with sockets before we call the server side unreachable +@@ -20128,7 +20131,6 @@ lets_roll() { + mybanner + check_proxy + check4openssl_oldfarts +- check_bsd_mount + + + if "$do_display_only"; then Modified: head/security/testssl.sh/pkg-descr ============================================================================== --- head/security/testssl.sh/pkg-descr Tue Sep 29 09:41:41 2020 (r550489) +++ head/security/testssl.sh/pkg-descr Tue Sep 29 10:10:50 2020 (r550490) @@ -3,13 +3,12 @@ any port for the support of TLS/SSL ciphers, protocols cryptographic flaws. Key features: - Clear output: you can tell easily whether anything is good or bad +- Machine readable output (CSV, two JSON formats) - Flexibility: You can test any SSL/TLS enabled and STARTTLS service, not only webservers at port 443 -- Toolbox: Several command line options help you to run YOUR test and - configure YOUR output +- Toolbox: Several command line options help you to run your test and + configure your output - Reliability: features are tested thoroughly -- Verbosity: If a particular check cannot be performed because of a - missing capability on your client side, you'll get a warning - Privacy: It's only you who sees the result, not a third party WWW: https://github.com/drwetter/testssl.sh