tests/common: Add different path to softhsm pkcs11 library to test also on different architectures

This commit is contained in:
Jakub Jelen 2019-08-26 15:13:22 +02:00 committed by Frank Morgner
parent cc9020f56a
commit 530175009c
1 changed files with 16 additions and 1 deletions

View File

@ -4,7 +4,22 @@
SOPIN="12345678"
PIN="123456"
PKCS11_TOOL="../src/tools/pkcs11-tool"
P11LIB="/usr/lib64/pkcs11/libsofthsm2.so"
softhsm_paths="/usr/local/lib/softhsm/libsofthsm2.so \
/usr/lib64/pkcs11/libsofthsm2.so \
/usr/lib/x86_64-linux-gnu/softhsm/libsofthsm2.so"
for LIB in $softhsm_paths; do
echo "Testing $LIB"
if [[ -f $LIB ]]; then
P11LIB=$LIB
echo "Setting P11LIB=$LIB"
break
fi
done
if [[ -z "$P11LIB" ]]; then
echo "Warning: Could not find the softhsm pkcs11 module"
fi
ERRORS=0
function assert() {