File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 6363
6464echo " [*] Configuring pam_pkcs11..."
6565
66+ # Temporarily unset WOLFPROV_FORCE_FAIL so we can test the failure case
67+ ORIG_WOLFPROV_FORCE_FAIL=" $WOLFPROV_FORCE_FAIL "
68+ unset WOLFPROV_FORCE_FAIL
69+
6670# Generate dummy CA cert if missing
6771if [ ! -f /test/certs/test-ca.crt ]; then
6872 echo " [*] Generating dummy test-ca.crt..."
@@ -99,6 +103,9 @@ cp /etc/pam.d/common-auth /etc/pam.d/common-auth.bak
99103echo " auth sufficient pam_pkcs11.so debug" | tee /etc/pam.d/common-auth > /dev/null
100104cat /etc/pam.d/common-auth.bak | tee -a /etc/pam.d/common-auth > /dev/null
101105
106+ # Restore WOLFPROV_FORCE_FAIL
107+ export WOLFPROV_FORCE_FAIL=" $ORIG_WOLFPROV_FORCE_FAIL "
108+
102109echo " [*] Initializing SoftHSM (simulated smartcard)..."
103110mkdir -p /var/lib/softhsm/tokens
104111softhsm2-util --init-token --free --label " testtoken" --pin 1234 --so-pin 123456
Original file line number Diff line number Diff line change 1- name : pam_pkcs11 Tests
1+ name : pam-pkcs11 Tests
22
33# START OF COMMON SECTION
44on :
You can’t perform that action at this time.
0 commit comments