commit:     775a8034310bde667d26ed5490b2dda1f894d6a6
Author:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 17 06:09:32 2025 +0000
Commit:     Hans de Graaff <graaff <AT> gentoo <DOT> org>
CommitDate: Tue Jun 17 06:09:32 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=775a8034

net-analyzer/sslscan: add 2.2.0

Signed-off-by: Hans de Graaff <graaff <AT> gentoo.org>

 net-analyzer/sslscan/Manifest                      |  2 +
 .../files/sslscan-2.2.0-use-distfile-openssl.patch | 18 +++++
 net-analyzer/sslscan/sslscan-2.2.0.ebuild          | 82 ++++++++++++++++++++++
 3 files changed, 102 insertions(+)

diff --git a/net-analyzer/sslscan/Manifest b/net-analyzer/sslscan/Manifest
index f05ed773579d..0bff299e3025 100644
--- a/net-analyzer/sslscan/Manifest
+++ b/net-analyzer/sslscan/Manifest
@@ -1,4 +1,6 @@
 DIST sslscan-2.1.4.tar.gz 114318 BLAKE2B 
4a2473a1fe76f276b6f2656cb9c688e4cb8fb829d76e048ddbf8693287ee50b74e5ba2bf7de44c71f4ae75e73e191c5a52e508c32dfb9cb32678dfbcd5247827
 SHA512 
2880df01cf4a9d05e151a67d0f7ec078645286ce467bb4ead97592d4aeb0a5d7373d67ce48cef8d211c5519fee88fbede7b90adee5e4da1feece51bf609a4318
 DIST sslscan-2.1.6.tar.gz 114417 BLAKE2B 
e510bb6079e04f19c7cda5cbeb2759c7ff7c710748dafc8410cbc12caa5b722a7307796a3df24863134ff8c228f9b01f530dd96adccf6d061ece9d5914c2a87d
 SHA512 
11cfde406c6c49b46f81e8942f0d2fa096b0c524abf1fdf203fca3ce668a8183c5e6800cdf12750edae8bf5b0cb6b4932219d1559dc88f802064154086807ab0
+DIST sslscan-2.2.0.tar.gz 117569 BLAKE2B 
65a43bba582215dcf2aaa54694a6c29b5dcdcbf5286e6549cc31d886738a932dc06d50510dee4c256251d33a275001fc1a3240182ad606e1e0da50657b8ec931
 SHA512 
b01cc5fc903cd15d6895675724c3e6f8060a97b1f1536af6e88e28d63cc5cfdd32beaf61f7a717ecfe0e802d61e092d5189f7b6259fbc9866b82562d3e82ad78
 DIST sslscan-openssl-3.0.14.tar.gz 15456760 BLAKE2B 
7a7f16466ebe63d81615c67256972e2f5f56ec4c095ff851add388edd872913a41f76f6c17056e13f43896c3b1f3b2f778497c8ecc920fc00dbc90093513aabe
 SHA512 
ebd70c82ef2b8d882858e26333c27b8975e55cc8a350b646c24505cd6feba1e92d4894026ec6b0cefe6d7dcbedb5799bd72df4114c832efb2616b68ad303f5d1
 DIST sslscan-openssl-3.3.3.tar.gz 18267456 BLAKE2B 
72c614cbeca1022e002f0d4c07453718cc1a767ed61295705617ea1494aba68eea9c87ea3fc1d1ab1b2f9676f34d9fd9360711cfc9b641588c7231144aa857af
 SHA512 
74256fd387b4204ae3ec0e6db8f5aeca24fd90314b5b5d2d51adcf27157c009fc4cad53a4a3ab37d97906c2c2dc79f6828177b671167835839f936a7ff205158
+DIST sslscan-openssl-3.5.0.tar.gz 53323888 BLAKE2B 
bfd846b0e96ae728bd6740a6b584748176d8706d8fcfa06a03295b373262e8c08eb30b99c987cfb4f78f9bc0c9665b1eb399685aad27db813d9cbb3b22973431
 SHA512 
a1ef09ecc810b761b3adcdb79b5746ba06244a10f626a40e495a3df19411546b98d75f6c7e7c13de7c15753caf3db87af7096ed0bb835afed8cc6dbc366b542f

diff --git 
a/net-analyzer/sslscan/files/sslscan-2.2.0-use-distfile-openssl.patch 
b/net-analyzer/sslscan/files/sslscan-2.2.0-use-distfile-openssl.patch
new file mode 100644
index 000000000000..b4f4836cbc5e
--- /dev/null
+++ b/net-analyzer/sslscan/files/sslscan-2.2.0-use-distfile-openssl.patch
@@ -0,0 +1,18 @@
+--- a/Makefile 2025-06-17 07:59:35.185135080 +0200
++++ b/Makefile 2025-06-17 08:00:23.657589676 +0200
+@@ -141,14 +141,7 @@
+       @true
+ 
+ opensslpull:
+-      upstream=`git ls-remote https://github.com/openssl/openssl | grep -Eo 
'(openssl-3\.5\.[0-9]+)' | sort -V | tail -n 1` ; \
+-      if [ -d openssl -a -d openssl/.git ]; then \
+-              if [ "$$upstream" != "`cd ./openssl && git describe 
--exact-match --tags`" ]; then \
+-                      cd ./openssl && git fetch --depth 1 origin 
refs/tags/$$upstream:refs/tags/$$upstream && git checkout $$upstream && touch 
../.openssl.is.fresh ; \
+-              fi \
+-      else \
+-              git clone --depth 1 -b $$upstream 
https://github.com/openssl/openssl ./openssl && cd ./openssl && touch 
../.openssl.is.fresh ; \
+-      fi
++      @true
+ 
+ openssl/Makefile: .openssl.is.fresh
+       cd ./openssl; ./Configure -v -fstack-protector-all -D_FORTIFY_SOURCE=2 
-fPIC no-shared enable-weak-ssl-ciphers zlib

diff --git a/net-analyzer/sslscan/sslscan-2.2.0.ebuild 
b/net-analyzer/sslscan/sslscan-2.2.0.ebuild
new file mode 100644
index 000000000000..f77810853ae1
--- /dev/null
+++ b/net-analyzer/sslscan/sslscan-2.2.0.ebuild
@@ -0,0 +1,82 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+# sslscan builds against a static openssl library to allow weak ciphers
+# to be enabled so that they can be tested.
+OPENSSL_RELEASE_TAG="openssl-3.5.0"
+
+DESCRIPTION="Fast SSL configuration scanner"
+HOMEPAGE="https://github.com/rbsec/sslscan";
+SRC_URI="https://github.com/rbsec/sslscan/archive/${PV}.tar.gz -> ${P}.tar.gz
+                
https://github.com/openssl/openssl/archive/${OPENSSL_RELEASE_TAG}.tar.gz -> 
${PN}-${OPENSSL_RELEASE_TAG}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~x86"
+
+# Requires a docker environment
+RESTRICT="test"
+
+PATCHES=( "${FILESDIR}/${P}-use-distfile-openssl.patch" )
+
+# S="${WORKDIR}/${P}-${MY_FORK}"
+
+src_prepare() {
+       ln -s ../openssl-${OPENSSL_RELEASE_TAG} openssl || die
+       touch .openssl_is_fresh || die
+
+       # Copied from dev-libs/openssl
+       # allow openssl to be cross-compiled
+       cp "${FILESDIR}"/gentoo.config-1.0.2 gentoo.config || die
+       chmod a+rx gentoo.config || die
+
+       default
+}
+
+src_configure() {
+       # Copied from dev-libs/openssl
+       unset APPS #197996
+       unset SCRIPTS #312551
+       unset CROSS_COMPILE #311473
+
+       tc-export CC AR RANLIB RC
+
+       local sslout=$(./gentoo.config)
+       einfo "Use configuration ${sslout:-(openssl knows best)}"
+       local config="Configure"
+       [[ -z ${sslout} ]] && config="config"
+
+       # Clean out hardcoded flags that openssl uses
+       local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \
+               -e 's:^CFLAGS=::' \
+               -e 's:\(^\| \)-fomit-frame-pointer::g' \
+               -e 's:\(^\| \)-O[^ ]*::g' \
+               -e 's:\(^\| \)-march=[^ ]*::g' \
+               -e 's:\(^\| \)-mcpu=[^ ]*::g' \
+               -e 's:\(^\| \)-m[^ ]*::g' \
+               -e 's:^ *::' \
+               -e 's: *$::' \
+               -e 's: \+: :g' \
+               -e 's:\\:\\\\:g'
+       )
+
+       # Now insert clean default flags with user flags
+       sed -i \
+               -e "/^CFLAGS=/s|=.*|=${DEFAULT_CFLAGS} ${CFLAGS}|" \
+               -e "/^LDFLAGS=/s|=[[:space:]]*$|=${LDFLAGS}|" \
+               Makefile || die
+}
+
+src_compile() {
+       emake static
+}
+
+src_install() {
+       DESTDIR="${D}" emake install
+
+       dodoc Changelog README.md
+}

Reply via email to