summaryrefslogtreecommitdiff
path: root/app-crypt
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-03-16 12:48:38 +0000
committerV3n3RiX <venerix@koprulu.sector>2024-03-16 12:48:38 +0000
commitd08ea43e9ada434f42f4be8e115b67ab22ce38af (patch)
treebdc9f44b886b8b704d67c2417df0b7b2055a2976 /app-crypt
parent80ea6e6ea87f4685ceff45cd13dd00d644688cac (diff)
gentoo auto-resync : 16:03:2024 - 12:48:37
Diffstat (limited to 'app-crypt')
-rw-r--r--app-crypt/Manifest.gzbin24811 -> 24808 bytes
-rw-r--r--app-crypt/pkcrack/Manifest2
-rw-r--r--app-crypt/pkcrack/files/pkcrack-1.2.2-gcc14-build.patch12
-rw-r--r--app-crypt/pkcrack/pkcrack-1.2.2-r2.ebuild57
-rw-r--r--app-crypt/tpm2-openssl/Manifest4
-rw-r--r--app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch28
-rw-r--r--app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch132
-rw-r--r--app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild67
8 files changed, 238 insertions, 64 deletions
diff --git a/app-crypt/Manifest.gz b/app-crypt/Manifest.gz
index ed095a7ed2d1..a808901b929a 100644
--- a/app-crypt/Manifest.gz
+++ b/app-crypt/Manifest.gz
Binary files differ
diff --git a/app-crypt/pkcrack/Manifest b/app-crypt/pkcrack/Manifest
index 4c2f8986679b..f0429adf1589 100644
--- a/app-crypt/pkcrack/Manifest
+++ b/app-crypt/pkcrack/Manifest
@@ -1,4 +1,6 @@
AUX pkcrack-1.2.2-build.patch 2539 BLAKE2B 54ce5effd250832aaf04977b4baa9a212cc80cf1fb4b50a7629314a7e716c2ced9a758f20631c0c783e25611ece51d19048880b9f63790140a8914a9661f1214 SHA512 48b71bc2d5aa850603eb1872c200465e655fcb527323ebc9d1728311fcf9fa15722f7b80a6809c7960ec0f4fcf3d4e65561880f61feb4dcbe35dedf15c198f20
+AUX pkcrack-1.2.2-gcc14-build.patch 361 BLAKE2B 0e358e97ea4358735a851218bbf2c1d89987f020b13189e0f71cb0a0f512a1b998b7d833d269b0f6ed90c3fc3ab88aacf5b3b6ebe7b638e45a6f2e0365f78433 SHA512 28ad5b3b0d5b0d69192998c32da8c69808b35ead5bf0f35601a40c9199daf1ec6637a0041e5a45bef7cbb2c207ad555e8a45c97a64b6a091d58e5200397edf78
DIST pkcrack-1.2.2.tar.gz 174208 BLAKE2B fed476a9d681bb9e565d05ef636f58d6643c4f8897725c56b66e64123e9435f9bf28e550f0249794e81e9f968683ab81c19baa1ee51478e1b91509e8e318725a SHA512 5c64fb9ae09dedc70fb20cd689f432059fcd64f689072b529b4045c3241760fee273ee921da081bc08be2e0594d27101c5d89d99cb2b84e16f80c011419b7200
EBUILD pkcrack-1.2.2-r1.ebuild 1077 BLAKE2B 3ec1a3eac544c67659276c412dfe9311643aa1f6d6c8489413ea4beb0d226e2cec08834a0de1e9daee0a96be7e5ff8717c0cf4ebabff4489f50a75aefbb1077b SHA512 2d18e8fe2dac4a843ce79de13669d378bb535e773245369c39cf9d99396ccfd37d152a83b44bcd622534ff6ce4fc504c28ce0f01773b6479cf9cc95dae54e3cb
+EBUILD pkcrack-1.2.2-r2.ebuild 1137 BLAKE2B d3d518f5d8a25cbfd65b71962527fffa8f3ad2d6cd1a0169d6fdb4a05db860efa3b43d5d663ba7ab75b7ff8cb8e32d735860a2cda0f61d746cfc883a924f24d0 SHA512 2986c8ad1b95afc37650b4ea7a01d323859ffef777de71ef2b29db093b320b5d2dc236fe60be41540ef3520b26d4f4a78052f14dfc4cd806caaf7a4e51e500e5
MISC metadata.xml 168 BLAKE2B 2e0e000b4c3b6ca04c12903fdbe278415c05a822623c52e9aa95cbbf3d50bcb1246b7edbda7d2f6b559af8950c6374e6e0a69b76319964cfe686bf50b0604a57 SHA512 4dcf45d1809e8390a2d8155c8ebfe0dd610203e392aeab0ccd8a10f42cc8532a4925eff32b35e7a6c35598a4efd288229034ec0732299dbd8cfa0acff705fed3
diff --git a/app-crypt/pkcrack/files/pkcrack-1.2.2-gcc14-build.patch b/app-crypt/pkcrack/files/pkcrack-1.2.2-gcc14-build.patch
new file mode 100644
index 000000000000..2f37f1aab49b
--- /dev/null
+++ b/app-crypt/pkcrack/files/pkcrack-1.2.2-gcc14-build.patch
@@ -0,0 +1,12 @@
+Bug: https://bugs.gentoo.org/924227
+--- a/src/zdmain.c
++++ b/src/zdmain.c
+@@ -53,7 +53,7 @@ char *c;
+ break;
+ default:
+ fprintf( stderr, "Usage: %s {<password> | <key0> <key1> <key2>} <cryptedzipfile> <plainzipfile>\n", argv[0] );
+- return;
++ return 0;
+ }
+
+ zipdecrypt( argv[argc-2], argv[argc-1], key0, key1, key2 );
diff --git a/app-crypt/pkcrack/pkcrack-1.2.2-r2.ebuild b/app-crypt/pkcrack/pkcrack-1.2.2-r2.ebuild
new file mode 100644
index 000000000000..877601fbf5eb
--- /dev/null
+++ b/app-crypt/pkcrack/pkcrack-1.2.2-r2.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit toolchain-funcs
+
+DESCRIPTION="PkZip cipher breaker"
+HOMEPAGE="https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack.html"
+SRC_URI="https://www.unix-ag.uni-kl.de/~conrad/krypto/pkcrack/${P}.tar.gz"
+
+LICENSE="pkcrack"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="test"
+RESTRICT="!test? ( test )"
+
+RDEPEND="!<app-text/html-xml-utils-5.3"
+BDEPEND="test? ( app-arch/zip[crypt] )"
+
+DOCS=(
+ doc/KNOWN_BUGS
+ doc/appnote.iz.txt
+ doc/README.W32
+ doc/pkzip.ps.gz
+ doc/CHANGES
+ doc/LIESMICH
+ doc/README.html
+ doc/README
+)
+
+PATCHES=(
+ "${FILESDIR}/${P}-build.patch"
+ "${FILESDIR}/${P}-gcc14-build.patch"
+)
+
+src_compile() {
+ cd src || die
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" all
+}
+
+src_test() {
+ cd test || die
+ emake CC="$(tc-getCC)" CFLAGS="${CFLAGS} ${LDFLAGS}" all
+}
+
+src_install() {
+ einstalldocs
+ cd src || die
+ dobin pkcrack zipdecrypt findkey makekey
+ newbin extract "${PN}-extract"
+}
+
+pkg_postinst() {
+ ewarn "Due to file collision, extract utility was renamed to ${PN}-extract,"
+ ewarn "see bug#247394"
+}
diff --git a/app-crypt/tpm2-openssl/Manifest b/app-crypt/tpm2-openssl/Manifest
index 6805d2c69cc3..11808a412dde 100644
--- a/app-crypt/tpm2-openssl/Manifest
+++ b/app-crypt/tpm2-openssl/Manifest
@@ -1,4 +1,6 @@
AUX tpm2-openssl-1.1.1-build-Fix-undefined-references-when-using-slibtool.patch 975 BLAKE2B 6a7b744513e026cbcc916543d3aa17300a63185eb112c3f1afb1eb4ffb0a02554c18759106c0c7d82efab9bc7b8c9e9f8809f06959edf763d6b38458416d160e SHA512 a4bc43d08f4cd70ba39a3396351894454edbb4ef284344a3184c8538685b15d85a8554619077d03d694e1355dcac5ab57976531f47158f5d2575c5bf7207e966
+AUX tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch 800 BLAKE2B 8e7795ec80c60308e1c2f4a20ff1fb41cada0479a0a5fc6ad393d066174460e9088728f535b4b5cff1cb57392f3eef683639255e8684274b346632db42d9f6e8 SHA512 946891b571d109272a8c82efd985cac4071ef97cd5be7109cc14652a1e92b27f05d4df0cab27ab2ac7bf0cd54181ae9b480123dbc97c6ab0c6400d33f7c4bd30
+AUX tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch 3843 BLAKE2B 12447aa593fed49b360b6a6f51d53c363b5034f434fb9a8ae5099d13199a11b2359b79ed6a5d8af41a4ca98d77426ca652b72b322dbc7e830dfd722ed5c43b25 SHA512 1b26c5aef886cbfebd012088ecec6782d7abb63ef2dde27cd21fce0982c8394445686e08efc6760a4b0217bfb45560aa6594c242f61bb59fd35706110cc7cae1
DIST tpm2-openssl-1.2.0.tar.gz 424967 BLAKE2B 9bcdc47b2eb94329caace24f10e8c234cdd92250ee7fdd4f6156c278328c0103a2285234e64f48f951f5e1b77e72341eb129ee996e628641a4032849fe5a62ce SHA512 4a12c83a0687768cd972a8d7e544f4bba2debcd24d7da2d2ee9adb097d1565bb1d69d1c448edff05f040b95700847293a8e33bfe92f43e536d13bc734ded1e1d
-EBUILD tpm2-openssl-1.2.0.ebuild 2368 BLAKE2B 70e40eafa27deb789df273f38679cf960f7fbb1e547819a31054c97c64598a0383b49b1efb8b3c9d0929c9026e82bbab38768c2617e8771695dc030c68703616 SHA512 52789fca0b21937fd09e7003c6bd4f99c5188ee8af65dcc9190fb7d582a40f146e9e92e5f4209cd2a79fae2123c23375d14742c945a8fc266b0e6f001b86beb9
+EBUILD tpm2-openssl-1.2.0.ebuild 1083 BLAKE2B 7fcacbfd8cfe0569513244b5084897d9566027f00132f44a98370da2b3ac90424eafc089c31404b98a30fa375238a908b97d183469ad2e94946245647a0c6d0f SHA512 493e5735afb7b29c1b5ae5ad4af17d99f0d1ee15d269b2dec54bd490f810af73f0bd443056b2af2dbefd5127667ca456e87bd719e822011f36414253203d0c34
MISC metadata.xml 495 BLAKE2B 2859f35839200edede18d42a8c1e04c3eb2a8983e35a6aa73352d20f5f1a9b8e2685091ab6c121442bbc23ef232ab701cfe1e5eb2f1e2fbd8c3fa1cafd51b749 SHA512 cf93a17e4ef6cf8e9294fadd0b7a33ccf21196bf648f1239a99cb0d8675c130e7e5ab7990b9a292f0814072ee3d234085d92e250f72b86ad854d81a68a642879
diff --git a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch
new file mode 100644
index 000000000000..326fb10767f9
--- /dev/null
+++ b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch
@@ -0,0 +1,28 @@
+From be35c35ace48647bb73ae5028db7e8caaccd038d Mon Sep 17 00:00:00 2001
+From: Adrian Freihofer <adrian.freihofer@gmail.com>
+Date: Fri, 8 Dec 2023 14:24:17 +0100
+Subject: [PATCH 1/2] Makefile: add run-with-simulator to extra dists
+
+The run-with-simulator script is executed by the make check step of
+the rpm build process. Therefore it should be packaged into the release
+tar bundles.
+
+Signed-off-by: Adrian Freihofer <adrian.freihofer@gmail.com>
+---
+ Makefile.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile.am b/Makefile.am
+index 160d84e..994a8e3 100644
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -143,5 +143,6 @@ EXTRA_DIST = \
+ VERSION \
+ $(TESTS_SHELL) \
+ $(SH_LOG_COMPILER) \
++ test/run-with-simulator \
+ test/ec_pki/openssl.cnf \
+ test/rsa_pki/etc
+--
+2.43.0
+
diff --git a/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch
new file mode 100644
index 000000000000..33b51b6b1028
--- /dev/null
+++ b/app-crypt/tpm2-openssl/files/tpm2-openssl-1.2.0-tests-run-with-simulator-in-container.patch
@@ -0,0 +1,132 @@
+diff --git a/home/salahx/Downloads/run-with-simulator b/home/salahx/Downloads/run-with-simulator
+new file mode 100755
+index 000000000000..e29b591f8d8b
+--- /dev/null
++++ b/test/run-with-simulator
+@@ -0,0 +1,126 @@
++#!/bin/bash
++# SPDX-License-Identifier: BSD-3-Clause
++
++SIM_PORT_DATA=2321
++SIM_PORT_CMD=$((SIM_PORT_DATA+1))
++
++# Run from top dir of this repository
++SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
++TOP_DIR="$(realpath "$SCRIPT_DIR/..")"
++cd "$TOP_DIR" || { echo "Error: cd to cd $TOP_DIR failed"; exit 1; }
++
++
++verify_simulator_is_running() {
++ local pid_tpm=$1
++
++ sleep 1
++ ss -lntp4 2> /dev/null | grep "${pid_tpm}" | grep -q "${SIM_PORT_DATA}"
++ ret_data=$?
++ ss -lntp4 2> /dev/null | grep "${pid_tpm}" | grep -q "${SIM_PORT_CMD}"
++ ret_cmd=$?
++ if [ $ret_data -eq 0 ] && [ $ret_cmd -eq 0 ]; then
++ echo "Simulator with PID ${pid_tpm} bound to port ${SIM_PORT_DATA} and ${SIM_PORT_CMD} successfully."
++ return 0
++ else
++ echo "Error: Port conflict? Cleaning up PID: ${pid_tpm}"
++ return 1
++ fi
++}
++
++build_tpm2_simulator_ibm() (
++ test -d ibmtpm && return
++ echo "---> compiling IBM tpm simulator"
++ mkdir ibmtpm
++ curl -Ls https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm1682.tar.gz | tar xz -C ibmtpm
++ cd ibmtpm/src && make
++)
++
++start_tpm2_simulator_ibm () {
++ build_tpm2_simulator_ibm || return 1
++
++ echo "---> starting IBM tpm simulator"
++ ibmtpm/src/tpm_server &
++ pid_tpm=$!
++ verify_simulator_is_running $pid_tpm
++}
++
++start_tpm2_simulator_swtpm () {
++ echo "---> starting swtpm simulator"
++ swtpm socket --tpm2 \
++ --server port=$SIM_PORT_DATA \
++ --ctrl type=tcp,port=$SIM_PORT_CMD \
++ --flags not-need-init \
++ --tpmstate dir="$PWD" \
++ --seccomp action=none &
++ pid_tpm=$!
++ verify_simulator_is_running $pid_tpm
++}
++
++start_dbusd () {
++ echo "---> starting dbus daemon"
++ dbus-daemon --session --print-address > /tmp/bus-socket-path.txt &
++ sleep 1
++ DBUS_SESSION_BUS_ADDRESS="$(tail -n1 /tmp/bus-socket-path.txt)"
++ export DBUS_SESSION_BUS_ADDRESS
++}
++
++start_tpm2_abrmd() {
++ local tabrmd_tcti=$1
++
++ echo "---> starting abrmd"
++ local tabrmd_name="com.intel.tss2.Tabrmd${SIM_PORT_DATA}"
++ tpm2-abrmd --session --dbus-name="${tabrmd_name}" --tcti "${tabrmd_tcti}:host=localhost,port=${SIM_PORT_DATA}" &
++ TCTI_ADDRESS="tabrmd:bus_name=${tabrmd_name},bus_type=session"
++ TPM2TOOLS_TCTI="$TCTI_ADDRESS"
++ TPM2OPENSSL_TCTI="$TCTI_ADDRESS"
++ export TPM2TOOLS_TCTI
++ export TPM2OPENSSL_TCTI
++ sleep 1
++# busctl --address="${DBUS_SESSION_BUS_ADDRESS}" list | grep "$tabrmd_name"
++}
++
++start_tpm2_sim_env() {
++ local sim_type=$1
++
++ start_dbusd
++
++ if [ "$sim_type" = "swtpm" ]; then
++ start_tpm2_simulator_swtpm || return 1
++ start_tpm2_abrmd swtpm || return 1
++ elif [ "$sim_type" = "ibm" ]; then
++ start_tpm2_simulator_ibm || return 1
++ start_tpm2_abrmd mssim || return 1
++ else
++ echo "invalid tpm simulator typ"
++ return 1
++ fi
++}
++
++make_check () {
++ echo "Running make check"
++ openssl version
++ tpm2_getcap properties-fixed | head -n 20
++ make check
++}
++
++function cleanup()
++{
++ pkill -P $$
++}
++trap cleanup EXIT
++
++build_tpm2_openssl() {
++ ./bootstrap
++ ./configure CC=gcc --enable-op-digest --enable-op-cipher
++ make
++}
++
++SIM_TYPE=${1:-swtpm}
++SKIP_BUILD=${2:-build}
++if [ "$SKIP_BUILD" = "skip-build" ]; then
++ echo "Skipping the build"
++else
++ build_tpm2_openssl || { echo "Compiling tpm2-openssl failed"; exit 1; }
++fi
++start_tpm2_sim_env "${SIM_TYPE}" || { echo "Starting tpm2 simulator failed ($SIM_TYPE)"; exit 1; }
++make_check || { echo "tpm2-openssl make check failed"; exit 1; }
diff --git a/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild b/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild
index c2be93546c0c..03767401d089 100644
--- a/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild
+++ b/app-crypt/tpm2-openssl/tpm2-openssl-1.2.0.ebuild
@@ -29,77 +29,18 @@ BDEPEND="
virtual/pkgconfig"
PATCHES=(
+ "${FILESDIR}/${PN}-1.2.0-tests-run-with-simulator-in-container.patch"
+ "${FILESDIR}/${PN}-1.2.0-Makefile-add-run-with-simulator-to-extra-dists.patch"
"${FILESDIR}/${PN}-1.1.1-build-Fix-undefined-references-when-using-slibtool.patch"
)
src_prepare() {
- eautoreconf
default
+ eautoreconf
}
src_test() {
- dbus_run() {
- (
- # start isolated dbus session bus
- local dbus_data=$(dbus-launch --sh-syntax) || exit
- eval "${dbus_data}"
-
- $@
- ret=${?}
-
- kill "${DBUS_SESSION_BUS_PID}"
- exit "${ret}"
- ) || die
- }
-
- tpm2_run_with_emulator() {
- local -x XDG_CONFIG_HOME="${T}"/.config/swtpm
- "${BROOT}"/usr/share/swtpm/swtpm-create-user-config-files || die
-
- mkdir -p "${XDG_CONFIG_HOME}"/mytpm1 || die
- local swtpm_setup_args=(
- --tpm2
- --tpmstate "${XDG_CONFIG_HOME}"/mytpm1
- --createek
- --allow-signing
- --decryption
- --create-ek-cert
- --create-platform-cert
- --lock-nvram
- --overwrite
- --display
- )
- swtpm_setup "${swtpm_setup_args[@]}" || die
-
- local swtpm_socket_args=(
- --tpm2
- --tpmstate dir="${XDG_CONFIG_HOME}"/mytpm1
- --flags startup-clear
- --ctrl type=unixio,path="${XDG_CONFIG_HOME}"/mytpm1/swtpm.socket.ctrl
- --server type=unixio,path="${XDG_CONFIG_HOME}"/mytpm1/swtpm.socket
- --pid file="${XDG_CONFIG_HOME}"/mytpm1/swtpm.pid
- --daemon
- )
- swtpm socket "${swtpm_socket_args[@]}" || die
-
- local tpm2_abrmd_args=(
- --logger=stdout
- --tcti=swtpm:path="${XDG_CONFIG_HOME}"/mytpm1/swtpm.socket
- --session
- --flush-all
- )
- tpm2-abrmd "${tpm2_abrmd_args[@]}" &
-
- local -x TPM2OPENSSL_TCTI="tabrmd:bus_type=session"
- local -x TPM2TOOLS_TCTI="tabrmd:bus_type=session"
-
- $@ || die
-
- # When swtpm dies, tmp2-abrmd will exit
- kill $(< "${XDG_CONFIG_HOME}"/mytpm1/swtpm.pid) || die
- }
-
- dbus_run tpm2_run_with_emulator make check
+ "${S}/test/run-with-simulator" swtpm skip-build || die
}
src_install() {