Skip to content

feat(jetsocat): add SAN and EKU diagnostics to doctor module#1719

Merged
Benoît Cortier (CBenoit) merged 3 commits intomasterfrom
DGW-350
Mar 19, 2026
Merged

feat(jetsocat): add SAN and EKU diagnostics to doctor module#1719
Benoît Cortier (CBenoit) merged 3 commits intomasterfrom
DGW-350

Conversation

@CBenoit
Copy link
Member

@CBenoit Benoît Cortier (CBenoit) commented Mar 19, 2026

Add certificate extension checks mirroring the gateway's TlsVerifyStrict
validation. Each TLS backend (rustls, openssl, schannel) now runs two new
diagnostics on the end-entity certificate:

  • check_san_extension: verifies the Subject Alternative Name extension is present
  • check_server_auth_eku: verifies the Extended Key Usage includes serverAuth

Issue: DGW-350

Other commits:

I will rebase-merge.

Add certificate extension checks mirroring the gateway's TlsVerifyStrict
validation. Each TLS backend (rustls, openssl, schannel) now runs two new
diagnostics on the end-entity certificate:

- check_san_extension: verifies the Subject Alternative Name extension is present
- check_server_auth_eku: verifies the Extended Key Usage includes serverAuth

Issue: DGW-350
Set end_entity_info in schannel_read_chain for the leaf certificate, so
that cert checks work when loading a chain from a PEM file.

Remove ChainCtx struct in favor of separate store and end_entity_info
locals, using the same Option-unwrap pattern already established for the
store. This naturally gates cert checks on chain availability and makes
schannel_read_chain fail explicitly when the chain file contains no
certificates.

Remove the #[cfg_attr(windows, ignore)] attributes from doctor tests.
Adds a doctor test using a self-signed certificate that has no Subject
Alternative Name extension and no Extended Key Usage extension. Verifies
that the SAN and EKU checks fail with TlsVerifyStrict warnings on all
backends, while unrelated checks still succeed.
@CBenoit Benoît Cortier (CBenoit) enabled auto-merge (rebase) March 19, 2026 03:02
@CBenoit Benoît Cortier (CBenoit) merged commit 78335e0 into master Mar 19, 2026
42 checks passed
@CBenoit Benoît Cortier (CBenoit) deleted the DGW-350 branch March 19, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants