From ede266acc24caed6cb652b0da612327896d68c4e Mon Sep 17 00:00:00 2001 From: Eric Blankenhorn Date: Tue, 5 May 2026 15:41:14 -0500 Subject: [PATCH] Fixes from review --- tests/api/test_ossl_x509.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/api/test_ossl_x509.c b/tests/api/test_ossl_x509.c index c992d7f4d4..30e9f82b20 100644 --- a/tests/api/test_ossl_x509.c +++ b/tests/api/test_ossl_x509.c @@ -1662,7 +1662,8 @@ int test_wolfssl_local_IsValidFQDN(void) { test_cases[i].is_FQDN); if (! EXPECT_SUCCESS()) { fprintf(stderr, "wolfssl_local_IsValidFQDN() wrong result for " - "case %d \"%s\"\n", i, test_cases[i].str); + "case %d \"%s\"\n", i, + test_cases[i].str ? test_cases[i].str : "(null)"); break; } } @@ -1709,12 +1710,12 @@ int test_wolfssl_local_IsValidFQDN(void) { /* Verify that MatchDomainName() refuses to expand wildcards across IDNA * A-labels (xn-- prefix) per RFC 6125 sec. 6.4.3 / RFC 9525 sec. 6.3. * - * MatchDomainName() is WOLFSSL_LOCAL but visible to the test binary because - * tests link against the in-tree library. */ + * MatchDomainName() is exposed for testing via the visibility mechanism + * declared in wolfssl/internal.h. */ int test_wolfSSL_MatchDomainName_idn(void) { EXPECT_DECLS; -#if !defined(NO_CERTS) +#if !defined(NO_ASN) && !defined(WOLFCRYPT_ONLY) && !defined(NO_CERTS) static const struct { const char* pattern; const char* host; @@ -1790,7 +1791,7 @@ int test_wolfSSL_MatchDomainName_idn(void) break; } } -#endif /* !NO_CERTS */ +#endif /* !NO_ASN && !WOLFCRYPT_ONLY && !NO_CERTS */ return EXPECT_RESULT(); }