Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions scripts/cmd_test/rsa-cmd-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ KEY_TYPES=("RSA" "RSA-PSS")
KEY_SIZES=("2048" "3072" "4096")
PROVIDER_ARGS=("-provider-path $WOLFPROV_PATH -provider libwolfprov" "-provider default")

WOLFPROV_FORCE_FAIL=${WOLFPROV_FORCE_FAIL:-0}

echo "=== Running RSA Key Generation Tests ==="

# Function to validate key
Expand Down Expand Up @@ -305,8 +307,9 @@ generate_and_test_key() {
echo "Checking if ${provider_name} can use the key..."

# Try to use the key with wolfProvider (just check if it loads)
if $OPENSSL_BIN pkey -in "$output_file" -check \
${provider_args} -passin pass: >/dev/null; then
# Use -noout to avoid encoder lookup which we don't support with selection mask 133 (0x85)
if $OPENSSL_BIN pkey -in "$output_file" -check -noout \
${provider_args} -passin pass: ; then
echo "[PASS] ${provider_name} can use ${key_type} key (${key_size})"
check_force_fail
else
Expand Down
Loading