1
0
mirror of https://git.code.sf.net/p/linux-ima/ima-evm-utils synced 2025-04-29 07:03:37 +02:00

tests: Get the packages for pkcs11 testing on the CI/CD system

Get the packages for pkcs11 testing on the CI/CD system, where available.
On those system where it is not available, skip the two tests.

The following distros cannot run the pkcs11 tests:

- Alpine: package with pkcs11 engine not available
- CentOS7: softhsm 2.1.0 is too old for tests to work; tests also fail when
           trying to sign with pkcs11 URI using openssl command line tool
- OpenSuSE Leap: softhsm package not available in main repo

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
This commit is contained in:
Stefan Berger 2021-09-13 18:18:13 -04:00 committed by Mimi Zohar
parent e5b3097821
commit ebcdbfe91e
4 changed files with 16 additions and 1 deletions

View File

@ -12,12 +12,15 @@ apt-get install -y \
asciidoc \ asciidoc \
attr \ attr \
docbook-style-xsl \ docbook-style-xsl \
gnutls-utils \
libattr-devel \ libattr-devel \
libkeyutils-devel \ libkeyutils-devel \
libp11 \
libssl-devel \ libssl-devel \
openssl \ openssl \
openssl-gost-engine \ openssl-gost-engine \
rpm-build \ rpm-build \
softhsm \
wget \ wget \
xsltproc \ xsltproc \
xxd \ xxd \

View File

@ -48,7 +48,8 @@ $apt \
procps \ procps \
sudo \ sudo \
wget \ wget \
xsltproc \ xsltproc
$apt xxd || $apt vim-common $apt xxd || $apt vim-common
$apt libengine-gost-openssl1.1$ARCH || true $apt libengine-gost-openssl1.1$ARCH || true
$apt softhsm gnutls-bin libengine-pkcs11-openssl1.1$ARCH || true

View File

@ -25,6 +25,7 @@ yum -y install \
automake \ automake \
diffutils \ diffutils \
docbook-xsl \ docbook-xsl \
gnutls-utils \
gzip \ gzip \
keyutils-libs-devel \ keyutils-libs-devel \
libattr-devel \ libattr-devel \
@ -33,6 +34,7 @@ yum -y install \
make \ make \
openssl \ openssl \
openssl-devel \ openssl-devel \
openssl-pkcs11 \
pkg-config \ pkg-config \
procps \ procps \
sudo \ sudo \
@ -42,3 +44,9 @@ yum -y install \
yum -y install docbook5-style-xsl || true yum -y install docbook5-style-xsl || true
yum -y install swtpm || true yum -y install swtpm || true
# SoftHSM is available via EPEL on CentOS
if [ -f /etc/centos-release ]; then
yum -y install epel-release
fi
yum -y install softhsm || true

View File

@ -42,6 +42,9 @@ zypper --non-interactive install --force-resolution --no-recommends \
which \ which \
xsltproc xsltproc
zypper --non-interactive install --force-resolution --no-recommends \
gnutls openssl-engine-libp11 softhsm || true
if [ -f /usr/lib/ibmtss/tpm_server -a ! -e /usr/local/bin/tpm_server ]; then if [ -f /usr/lib/ibmtss/tpm_server -a ! -e /usr/local/bin/tpm_server ]; then
ln -s /usr/lib/ibmtss/tpm_server /usr/local/bin ln -s /usr/lib/ibmtss/tpm_server /usr/local/bin
fi fi