-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from bandi13/moreFIPStests
More FIPS tests
- Loading branch information
Showing
13 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
# This script provides simple sanity checks to make sure the provider is working | ||
|
||
SET_PRE=$( set ) | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
LOG_FILE=${SCRIPT_DIR}/test-sanity.log | ||
rm -f ${LOG_FILE} | ||
source ${SCRIPT_DIR}/utils-wolfprovider.sh | ||
|
||
echo "Using openssl: $OPENSSL_TAG, wolfssl: $WOLFSSL_TAG" | ||
|
||
function doTestCmd() { | ||
CMD=$* | ||
echo ">>>>>> Running $CMD" | ||
eval $CMD | ||
RET=$? | ||
if [ $RET -ne 0 ]; then | ||
echo "Failed $CMD: $RET" | ||
exit 1 | ||
fi | ||
echo "<<<<<<" | ||
} | ||
|
||
function runSpotCheck() { | ||
doTestCmd init_wolfprov | ||
|
||
SET_POST=$( set ) | ||
echo "New variables set:" | ||
diff <(echo "$SET_PRE") <(echo "$SET_POST") | grep "=" | ||
|
||
doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep 'Providers:' -A 10" | ||
|
||
if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep libwolfprov | wc -l) = 0 ]; then | ||
echo "Not using wolfProvider for some reason" | ||
exit 2 | ||
fi | ||
|
||
if [ $(${OPENSSL_INSTALL_DIR}/bin/openssl list -providers --verbose | grep OpenSSL | wc -l) -ne 0 ]; then | ||
echo "OpenSSL provider is also enabled" | ||
exit 2 | ||
fi | ||
|
||
doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl s_client -CApath /etc/ssl/certs -connect github.com:443 </dev/null" | ||
doTestCmd "curl https://github.com/wolfSSL/wolfProvider -o test.html" | ||
|
||
doTestCmd "${OPENSSL_INSTALL_DIR}/bin/openssl s_client -CApath /etc/ssl/certs -connect tls.support:443 </dev/null" | ||
doTestCmd "curl https://tls.support -vv --tlsv1.3 --tls-max 1.3 -o test.html" | ||
} | ||
|
||
runSpotCheck | ||
|
||
exit $? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters