From a29e79ab9536d6f07f0f2b9161983f3ec0ee7059 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Mon, 26 Aug 2024 19:58:36 -0400 Subject: [PATCH] fixup! Refactor setup --- .github/workflows/build.yml | 17 ++++++++--------- tests/setup.sh | 13 +++++-------- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0a079b9d..23724707 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,23 +37,22 @@ jobs: dnf -y install $dnf_opts \ git ${{ matrix.compiler }} meson \ pkgconf-pkg-config openssl-devel openssl \ - diffutils expect valgrind + diffutils expect valgrind opensc gnutls-utils if [ "${{ matrix.token }}" = "softokn" ]; then dnf -y install nss-softokn nss-tools nss-softokn-devel elif [ "${{ matrix.token }}" = "softhsm" ]; then - dnf -y install softhsm opensc p11-kit-devel p11-kit-server \ - gnutls-utils + dnf -y install softhsm p11-kit-devel p11-kit-server fi elif [ -f /etc/debian_version ]; then apt-get -q update apt-get -yq install git ${{ matrix.compiler }} meson \ pkg-config libssl-dev openssl expect \ - valgrind procps + valgrind procps opensc gnutls-bin if [ "${{ matrix.token }}" = "softokn" ]; then apt-get -yq install libnss3 libnss3-tools libnss3-dev elif [ "${{ matrix.token }}" = "softhsm" ]; then - apt-get -yq install softhsm2 opensc p11-kit libp11-kit-dev \ - p11-kit-modules gnutls-bin + apt-get -yq install softhsm2 p11-kit libp11-kit-dev \ + p11-kit-modules fi fi - name: Checkout Repository @@ -103,13 +102,13 @@ jobs: brew install \ meson \ openssl@3 \ - pkg-config + pkg-config \ + opensc \ + p11-kit if [ "${{ matrix.token }}" = "softokn" ]; then brew install nss elif [ "${{ matrix.token }}" = "softhsm" ]; then brew install \ - opensc \ - p11-kit \ softhsm fi - name: Checkout Repository diff --git a/tests/setup.sh b/tests/setup.sh index c5cfade1..36e07d2f 100755 --- a/tests/setup.sh +++ b/tests/setup.sh @@ -1,5 +1,5 @@ #!/bin/bash -ex -# Copyright (C) 2024 Simo Sorcen +# Copyright (C) 2024 Simo Sorce # SPDX-License-Identifier: Apache-2.0 source "${TESTSSRCDIR}/helpers.sh" @@ -10,18 +10,13 @@ fi TOKENTYPE=$1 -# Temporary dir +# Temporary dir and Token data dir TMPPDIR="${TESTBLDDIR}/${TOKENTYPE}" +TOKDIR="$TMPPDIR/tokens" if [ -d "${TMPPDIR}" ]; then rm -fr "${TMPPDIR}" fi mkdir "${TMPPDIR}" - -# Token data dir -TOKDIR="$TMPPDIR/tokens" -if [ -d "${TOKDIR}" ]; then - rm -fr "${TOKDIR}" -fi mkdir "${TOKDIR}" PINVALUE="12345678" @@ -323,6 +318,8 @@ echo "" if [ -f /etc/redhat-release ]; then title PARA "explicit EC unsupported on Fedora/EL" +elif [ "${TOKENTYPE}" == "softokn" ]; then + title PARA "explicit EC unsupported with softokn" else title PARA "generate explicit EC key pair" KEYID='0007'