ssl-opt.sh: add test of RSA Opaque keys with TLS 1.2 server for decryption

Signed-off-by: Przemek Stekiel <przemyslaw.stekiel@mobica.com>
This commit is contained in:
Przemek Stekiel 2022-05-16 14:37:50 +02:00
parent d87e46f3de
commit 8da6da3da2

View file

@ -1743,6 +1743,36 @@ run_test "TLS-DHE-RSA Opaque key for client authentication" \
-S "error" \
-C "error"
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
requires_config_enabled MBEDTLS_USE_PSA_CRYPTO
requires_config_enabled MBEDTLS_RSA_C
run_test "RSA opaque key on server configured for decryption" \
"$P_SRV debug_level=1 key_opaque=1 key_opaque_algs=rsa-decrypt,none" \
"$P_CLI force_ciphersuite=TLS-RSA-WITH-AES-128-CBC-SHA256" \
0 \
-c "Verifying peer X.509 certificate... ok" \
-c "Ciphersuite is TLS-RSA-" \
-s "key types: Opaque, Opaque" \
-s "Ciphersuite is TLS-RSA-" \
-S "error" \
-C "error"
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
requires_config_enabled MBEDTLS_USE_PSA_CRYPTO
requires_config_enabled MBEDTLS_RSA_C
run_test "RSA-PSK opaque key on server configured for decryption" \
"$P_SRV debug_level=1 key_opaque=1 key_opaque_algs=rsa-decrypt,none \
psk=abc123 psk_identity=foo" \
"$P_CLI force_ciphersuite=TLS-RSA-PSK-WITH-AES-128-CBC-SHA256 \
psk=abc123 psk_identity=foo" \
0 \
-c "Verifying peer X.509 certificate... ok" \
-c "Ciphersuite is TLS-RSA-PSK-" \
-s "key types: Opaque, Opaque" \
-s "Ciphersuite is TLS-RSA-PSK-" \
-S "error" \
-C "error"
# Test using an EC opaque private key for server authentication
requires_config_enabled MBEDTLS_SSL_PROTO_TLS1_2
requires_config_enabled MBEDTLS_USE_PSA_CRYPTO