Merge pull request #169 from ColtonWilley/fix-wolfprovider-fips

wolfprovider: fix cmd-test tooling and first-run FIPS detection
pull/175/head
Zackery 2026-07-24 18:50:36 -06:00 committed by GitHub
commit 09e33a080b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -12,7 +12,8 @@ DEPENDS = "openssl virtual/wolfssl wolfprovider"
inherit wolfssl-compatibility
python __anonymous() {
wolfssl_varSet(d, 'RDEPENDS', '${PN}', 'bash openssl wolfprovider')
# wrapper sources wolfproviderenv and runs the openssl CLI at runtime
wolfssl_varSet(d, 'RDEPENDS', '${PN}', 'bash openssl openssl-bin wolfprovider wolfproviderenv')
}
SRC_URI = "git://github.com/wolfssl/wolfProvider.git;nobranch=1;protocol=https;rev=046f4ac583ca7612386f4c38ca29a9d191785aa8 \
@ -48,6 +49,7 @@ do_install() {
# Copy env setup script to scripts/
install -m 0755 ${S}/scripts/env-setup ${WOLFPROV_CMD_TEST_INSTALL_DIR}/scripts/
install -m 0755 ${S}/scripts/utils-general.sh ${WOLFPROV_CMD_TEST_INSTALL_DIR}/scripts/
# Copy provider configuration files to root of test dir
install -m 0644 ${S}/provider.conf ${WOLFPROV_CMD_TEST_INSTALL_DIR}/

View File

@ -80,8 +80,13 @@ if [ -f /etc/wolfssl/fips-enabled ]; then
fi
fi
# Method 2: Check runtime detection for FIPS mode
# Load the module directly so detection works before openssl.cnf is seeded
# (first boot); fall back to the provider listing.
RUNTIME_FIPS=-1
PROVIDER_FIPS=$(openssl list -providers 2>/dev/null | grep "name:" | grep -i "wolfSSL Provider FIPS")
PROVIDER_FIPS=$(openssl list -providers -provider libwolfprov 2>/dev/null | grep "name:" | grep -i "wolfSSL Provider FIPS")
if [ -z "$PROVIDER_FIPS" ]; then
PROVIDER_FIPS=$(openssl list -providers 2>/dev/null | grep "name:" | grep -i "wolfSSL Provider FIPS")
fi
if [ -n "$PROVIDER_FIPS" ]; then
RUNTIME_FIPS=1
echo "Detected wolfSSL FIPS build (runtime detection)"