Skip to content

Commit 1095646

Browse files
authored
Merge pull request #297 from padelsbach/wp-fix-fips-check-wolfssl
Fix fips check when building wolfssl
2 parents 1c0969b + 523e8e7 commit 1095646

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/utils-wolfssl.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,12 @@ install_wolfssl() {
103103
# Check if there is a FIPS mismatch
104104
# If the system wolfSSL is FIPS, we need to be doing a FIPS build
105105
dpkg -l | grep "^ii.*libwolfssl[[:space:]]" | grep -q "fips"
106-
if [ $? -eq 0 ] && [ "$WOLFSSL_ISFIPS" != "1" ]; then
106+
fips_mode=$?
107+
if [ $fips_mode -eq 0 ] && [ "$WOLFSSL_ISFIPS" != "1" ]; then
107108
printf "ERROR: System wolfSSL is FIPS, but WOLFSSL_ISFIPS is not set to 1\n"
108109
do_cleanup
109110
exit 1
110-
elif [ $? -ne 0 ] && [ "$WOLFSSL_ISFIPS" != "0" ]; then
111+
elif [ $fips_mode -ne 0 ] && [ "$WOLFSSL_ISFIPS" != "0" ]; then
111112
printf "ERROR: System wolfSSL is non-FIPS, but WOLFSSL_ISFIPS is set to 1\n"
112113
do_cleanup
113114
exit 1

0 commit comments

Comments
 (0)