Skip to content

SSL verify partial chain - #88

Draft
andr-cher-scacap wants to merge 2 commits into
nginx:masterfrom
andr-cher-scacap:ssl-verify-partial-chain
Draft

SSL verify partial chain#88
andr-cher-scacap wants to merge 2 commits into
nginx:masterfrom
andr-cher-scacap:ssl-verify-partial-chain

Conversation

@andr-cher-scacap

Copy link
Copy Markdown

Problem

There was no dedicated regression coverage for the new
ssl_verify_client partial_chain mode.

Without targeted tests, it would be easy to regress the intended
behavior in one module while the others continue to pass.

Solution

Add focused regression tests for ssl_verify_client partial_chain in:

  • HTTP
  • stream
  • mail (IMAP)

The tests build a small CA hierarchy with a self-signed root, an
intermediate signed by that root, and a leaf client certificate signed by
the intermediate. The root is intentionally not trusted by nginx, so the
tests specifically verify that partial_chain accepts the leaf
certificate when the trusted intermediate is present.

The tests also verify that:

  • an unrelated certificate is rejected;
  • the control case with ssl_verify_client on still rejects the same
    leaf certificate when only the intermediate is trusted;
  • missing client certificates are rejected where partial_chain is
    expected to behave like on.

Testing

Validated with:

TEST_NGINX_BINARY=/path/to/nginx/objs/nginx prove -v \
    ssl_verify_client_partial_chain.t \
    stream_ssl_verify_client_partial_chain.t \
    mail_imap_ssl_partial_chain.t

Result: all 28 tests passed.

Closes: N/A

Checklist

Before submitting this PR, please confirm:

  • I have read the contributing guidelines
  • I have added tests (if applicable) to validate my changes
  • All existing tests pass
  • I have updated documentation where necessary
  • My branch is rebased on the latest master
  • This PR targets the master branch from my fork
  • My commit message follows project standards and contains only
    relevant changes

Release Notes

Added regression coverage for the new ssl_verify_client partial_chain
mode in HTTP, stream, and mail.

@andr-cher-scacap andr-cher-scacap changed the title Ssl verify partial chain SSL verify partial chain Jul 22, 2026
@sindhushiv
sindhushiv requested a review from jimf5 July 23, 2026 22:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

4 participants