Skip to content

Commit 47889fe

Browse files
committed
Fix WPFF CI failures
1 parent 5d16735 commit 47889fe

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,22 @@ else
1010
exit 1
1111
fi
1212

13+
# Deterministic force-fail probe. The pam_pkcs11 test below exercises PAM via
14+
# 'su' as root, which never actually authenticates, so a force-fail-induced
15+
# crypto failure inside pam_pkcs11.so will not propagate to the script's exit
16+
# status. Probe wolfProvider directly here so the workflow fails closed if
17+
# WOLFPROV_FORCE_FAIL=1 is set but crypto still succeeds (e.g. apt replaced
18+
# the patched libssl3 and OpenSSL fell back to its built-in default provider).
19+
if [ "${WOLFPROV_FORCE_FAIL:-0}" = "1" ]; then
20+
if openssl rand -hex 16 >/dev/null 2>&1; then
21+
echo "FAIL: openssl rand succeeded with WOLFPROV_FORCE_FAIL=1;"
22+
echo " wolfProvider is not actually intercepting crypto."
23+
exit 1
24+
fi
25+
echo "[*] Force-fail probe confirmed wolfProvider is failing as expected"
26+
exit 1
27+
fi
28+
1329
echo "[*] Installing build dependencies..."
1430
apt-get update
1531
DEBIAN_FRONTEND=noninteractive apt-get install -y \

0 commit comments

Comments
 (0)