Repository navigation
Add WOLFSSL_ALLOW_SINGLE_LABEL_HOSTNAME to allow bypassing hostname label count check. - #11573
Conversation
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 1
Open (6)
ssl_sis updated to useserver-garbage.pemas its certificate, but there is no corresponding… · New This macro changes hostname validation semantics in a security-sensitive area (relaxing the “must… · Newtest_ctxis initialized and passed totest_memio_setup(), but there is no corresponding… · Newtest_ctxis initialized and passed totest_memio_setup(), but there is no corresponding… · New The#definelines are indented, which is atypical for preprocessor directives and can reduce… · New The comment says “single label, too short” but the expected result is nowSINGLE_LABEL_OK(i.e.,… · New
What changed in this PR
Adds an opt-in build macro to relax the FQDN label-count requirement so single-label hostnames can pass validation, along with test coverage for the new behavior.
Changes:
- Introduces
WOLFSSL_ALLOW_SINGLE_LABEL_HOSTNAMEto permit single-label hostnames inwolfssl_local_IsValidFQDN. - Adds new TLS API test for
wolfSSL_check_domain_name()behavior with single-label hostnames. - Updates X509/domain matching tests to conditionally expect single-label host acceptance.
| File | Description |
|---|---|
tests/api/test_tls.h |
Registers a new TLS API test for single-label hostname checking. |
tests/api/test_tls.c |
Adds a memio-based handshake test that exercises wolfSSL_check_domain_name() with single-label inputs. |
tests/api/test_ossl_x509.c |
Updates FQDN validity and domain match tests to be conditional on the new macro. |
src/ssl.c |
Implements the macro-controlled relaxation of label-count validation in wolfssl_local_IsValidFQDN. |
.wolfssl_known_macro_extras |
Adds the new macro to the known macro list. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
retest this please |
|
850209c to
43585f7
Compare
43585f7 to
c84bb7f
Compare
c84bb7f to
afed60e
Compare
|
tests good with multi-test. curl failure is unrelated. |



Description
Fixes zd#22514
Testing
Built in + added tests
Checklist