Skip to content

Commit 2271e4c

Browse files
committed
Unset / set WPFF so we can test the actual test case
1 parent 12b4c0e commit 2271e4c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/scripts/pam-pkcs11-test.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ fi
6363

6464
echo "[*] 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
6771
if [ ! -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
99103
echo "auth sufficient pam_pkcs11.so debug" | tee /etc/pam.d/common-auth > /dev/null
100104
cat /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+
102109
echo "[*] Initializing SoftHSM (simulated smartcard)..."
103110
mkdir -p /var/lib/softhsm/tokens
104111
softhsm2-util --init-token --free --label "testtoken" --pin 1234 --so-pin 123456

.github/workflows/pam-pkcs11.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: pam_pkcs11 Tests
1+
name: pam-pkcs11 Tests
22

33
# START OF COMMON SECTION
44
on:

0 commit comments

Comments
 (0)