From 7561911cbafad9727dbb8bc114b13bd361bcecb2 Mon Sep 17 00:00:00 2001 From: Roy Carter Date: Thu, 9 Apr 2026 01:22:27 +0300 Subject: [PATCH] fix: Fix build errors for some tests on pipeline --- src/ssl.c | 2 +- tests/api/test_tls.c | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 07912aeba7..e5bbb882e7 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -12202,7 +12202,7 @@ const char* wolfSSL_alert_desc_string(int alertID) case missing_extension: return "ME"; case unsupported_extension: - return "UE"; + return "XE"; case unrecognized_name: return "UN"; case bad_certificate_status_response: diff --git a/tests/api/test_tls.c b/tests/api/test_tls.c index 037b104844..8f646bc90c 100644 --- a/tests/api/test_tls.c +++ b/tests/api/test_tls.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include int test_utils_memio_move_message(void) @@ -1107,8 +1107,8 @@ int test_tls12_corrupted_finished(void) int test_wolfSSL_alert_type_string(void) { EXPECT_DECLS; -#ifndef NO_TLS - /* wolfSSL_alert_type_string returns short code for alert level */ +#if !defined(NO_TLS) && (defined(OPENSSL_EXTRA) || \ + defined(OPENSSL_EXTRA_X509_SMALL)) ExpectStrEQ(wolfSSL_alert_type_string(alert_warning), "W"); ExpectStrEQ(wolfSSL_alert_type_string(alert_fatal), "F"); ExpectStrEQ(wolfSSL_alert_type_string(0), "U"); @@ -1181,8 +1181,8 @@ int test_tls12_peerauth_failsafe(void) int test_wolfSSL_alert_desc_string(void) { EXPECT_DECLS; -#ifndef NO_TLS - /* wolfSSL_alert_desc_string returns short 2-letter code */ +#if !defined(NO_TLS) && (defined(OPENSSL_EXTRA) || \ + defined(OPENSSL_EXTRA_X509_SMALL)) ExpectStrEQ(wolfSSL_alert_desc_string(close_notify), "CN"); ExpectStrEQ(wolfSSL_alert_desc_string(unexpected_message), "UM"); ExpectStrEQ(wolfSSL_alert_desc_string(bad_record_mac), "BM"); @@ -1207,7 +1207,7 @@ int test_wolfSSL_alert_desc_string(void) ExpectStrEQ(wolfSSL_alert_desc_string(user_canceled), "US"); ExpectStrEQ(wolfSSL_alert_desc_string(no_renegotiation), "NR"); ExpectStrEQ(wolfSSL_alert_desc_string(missing_extension), "ME"); - ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_extension), "UE"); + ExpectStrEQ(wolfSSL_alert_desc_string(unsupported_extension), "XE"); ExpectStrEQ(wolfSSL_alert_desc_string(unrecognized_name), "UN"); ExpectStrEQ(wolfSSL_alert_desc_string(bad_certificate_status_response), "BR"); ExpectStrEQ(wolfSSL_alert_desc_string(unknown_psk_identity), "UP");