File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1663,7 +1663,8 @@ int test_wolfssl_local_IsValidFQDN(void) {
16631663 test_cases [i ].is_FQDN );
16641664 if (! EXPECT_SUCCESS ()) {
16651665 fprintf (stderr , "wolfssl_local_IsValidFQDN() wrong result for "
1666- "case %d \"%s\"\n" , i , test_cases [i ].str );
1666+ "case %d \"%s\"\n" , i ,
1667+ test_cases [i ].str ? test_cases [i ].str : "(null)" );
16671668 break ;
16681669 }
16691670 }
@@ -1710,12 +1711,12 @@ int test_wolfssl_local_IsValidFQDN(void) {
17101711/* Verify that MatchDomainName() refuses to expand wildcards across IDNA
17111712 * A-labels (xn-- prefix) per RFC 6125 sec. 6.4.3 / RFC 9525 sec. 6.3.
17121713 *
1713- * MatchDomainName() is WOLFSSL_LOCAL but visible to the test binary because
1714- * tests link against the in-tree library . */
1714+ * MatchDomainName() is exposed for testing via the visibility mechanism
1715+ * declared in wolfssl/internal.h . */
17151716int test_wolfSSL_MatchDomainName_idn (void )
17161717{
17171718 EXPECT_DECLS ;
1718- #if !defined(NO_CERTS )
1719+ #if !defined(NO_ASN ) && !defined( WOLFCRYPT_ONLY ) && !defined( NO_CERTS )
17191720 static const struct {
17201721 const char * pattern ;
17211722 const char * host ;
@@ -1791,7 +1792,7 @@ int test_wolfSSL_MatchDomainName_idn(void)
17911792 break ;
17921793 }
17931794 }
1794- #endif /* !NO_CERTS */
1795+ #endif /* !NO_ASN && !WOLFCRYPT_ONLY && ! NO_CERTS */
17951796 return EXPECT_RESULT ();
17961797}
17971798
Original file line number Diff line number Diff line change @@ -18076,7 +18076,11 @@ static int ConfirmNameConstraints(Signer* signer, DecodedCert* cert)
1807618076#endif /* IGNORE_NAME_CONSTRAINTS */
1807718077
1807818078#if !defined(WOLFCRYPT_ONLY) && !defined(NO_CERTS)
18079- /* Returns 1 if name is a syntactically valid DNS FQDN per RFC 952/1123.
18079+ /* Returns 1 if name is a syntactically valid DNS FQDN.
18080+ *
18081+ * Based on RFC 952/1123 DNS label rules, with the pragmatic extension that
18082+ * underscores are permitted in non-TLD labels (common in SRV/internal names
18083+ * despite RFC 952/1123 not allowing them).
1808018084 *
1808118085 * Rules enforced:
1808218086 * - Total effective length (excluding optional trailing dot) in [1, 253]
You can’t perform that action at this time.
0 commit comments