2019-02-01 18:48:34 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
source common.sh
|
|
|
|
|
|
|
|
echo "======================================================="
|
|
|
|
echo "Setup SoftHSM"
|
|
|
|
echo "======================================================="
|
|
|
|
if [[ ! -f $P11LIB ]]; then
|
|
|
|
echo "WARNINIG: The SoftHSM is not installed. Can not run this test"
|
|
|
|
exit 77;
|
|
|
|
fi
|
2020-01-08 13:32:41 +00:00
|
|
|
|
|
|
|
# The Ubuntu has old softhsm version not supporting this feature
|
|
|
|
grep "Ubuntu 18.04" /etc/issue && echo "WARNING: Not supported on Ubuntu 18.04" && exit 77
|
|
|
|
|
2019-02-01 18:48:34 +00:00
|
|
|
card_setup
|
|
|
|
|
|
|
|
echo "======================================================="
|
|
|
|
echo "Test"
|
|
|
|
echo "======================================================="
|
|
|
|
$PKCS11_TOOL --test -p $PIN --module $P11LIB
|
|
|
|
assert $? "Failed running tests"
|
|
|
|
|
|
|
|
echo "======================================================="
|
|
|
|
echo "Cleanup"
|
|
|
|
echo "======================================================="
|
|
|
|
card_cleanup
|
|
|
|
|
|
|
|
exit $ERRORS
|