From 449bc104c80e6c3cbf0ff991ef9dd4ac67c02798 Mon Sep 17 00:00:00 2001 From: Pauli Date: Thu, 1 Aug 2024 14:19:32 +1000 Subject: [PATCH] sslapitest: add meaningful skip messages Reviewed-by: Shane Lontis Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/25070) --- test/sslapitest.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test/sslapitest.c b/test/sslapitest.c index 612e1aab009..8006fb21a66 100644 --- a/test/sslapitest.c +++ b/test/sslapitest.c @@ -1562,7 +1562,7 @@ static int test_large_app_data(int tst) prot = TLS1_3_VERSION; break; #else - return 1; + return TEST_skip("TLS 1.3 not supported"); #endif case 1: @@ -1570,7 +1570,7 @@ static int test_large_app_data(int tst) prot = TLS1_2_VERSION; break; #else - return 1; + return TEST_skip("TLS 1.2 not supported"); #endif case 2: @@ -1578,7 +1578,7 @@ static int test_large_app_data(int tst) prot = TLS1_1_VERSION; break; #else - return 1; + return TEST_skip("TLS 1.1 not supported"); #endif case 3: @@ -1586,7 +1586,7 @@ static int test_large_app_data(int tst) prot = TLS1_VERSION; break; #else - return 1; + return TEST_skip("TLS 1 not supported"); #endif case 4: @@ -1594,7 +1594,7 @@ static int test_large_app_data(int tst) prot = SSL3_VERSION; break; #else - return 1; + return TEST_skip("SSL 3 not supported"); #endif case 5: @@ -1604,17 +1604,19 @@ static int test_large_app_data(int tst) cmeth = DTLS_client_method(); break; #else - return 1; + return TEST_skip("DTLS 1.2 not supported"); #endif case 6: #ifndef OPENSSL_NO_DTLS1 + if (is_fips) + return TEST_skip("DTLS 1 not supported by FIPS provider"); prot = DTLS1_VERSION; smeth = DTLS_server_method(); cmeth = DTLS_client_method(); break; #else - return 1; + return TEST_skip("DTLS 1 not supported"); #endif default: @@ -1622,8 +1624,8 @@ static int test_large_app_data(int tst) return 0; } - if ((prot < TLS1_2_VERSION || prot == DTLS1_VERSION) && is_fips) - return 1; + if (is_fips && prot < TLS1_2_VERSION) + return TEST_skip("TLS versions < 1.2 not supported by FIPS provider"); /* Maximal sized message of zeros */ msg = OPENSSL_zalloc(SSL3_RT_MAX_PLAIN_LENGTH); -- 2.47.2