Skip to content

mod_ssl: test the full SSLVHostSNIPolicy compatibility matrix - #1025

Merged
notroj merged 1 commit into
apache:trunkfrom
notroj:ssl-vhost-policy-test
Nov 13, 2026
Merged

notroj merged 1 commit into
apache:trunkfrom
notroj:ssl-vhost-policy-test

Conversation

@notroj

@notroj notroj commented Nov 13, 2026

Copy link
Copy Markdown
Collaborator

Replaces the two authonly classes in test/modules/ssl/test_005_vhost_compat.py with one parametrized class, TestVhostCompatPolicy, which checks the table in the SSLVHostSNIPolicy documentation: each policy (and the default, with no directive) against vhosts differing in nothing, in server certificate, ciphers or protocol, and in client CA or verify depth, with and without SNI.

A request for the handshake vhost itself is included for every policy. This is the regression test for 5f4b4bf (r1929631), the fix to strict mode in ssl_check_vhost_sni_policy(), which had no coverage: with that commit reverted the existing suite still passes, while the test1-strict cases here fail as the child crashes.

The old classes were gated on env.has_directive(), which reads httpd -L and so only sees statically linked modules. With a shared mod_ssl the authonly tests never set the directive and were reported as XFAIL/XPASS. The new class is gated with need_min_apache_version("2.4.66") instead, and has_directive() is removed as it has no other callers.

A differing SSLVerifyClient is not in the matrix: under insecure the request is allowed but then fails on post-handshake authentication, so there is no clean 200 to assert. SSLOpenSSLConfCmd is left out for portability.

🤖 Generated with Claude Code

  New parametrized test of each SSLVHostSNIPolicy, and the default,
  against each class of vhost difference, gated on the server version.
  (TestVhostCompatAuthonly, TestVhostCompatAuthonlyAuth): Remove,
  covered by the above.

* test/pyhttpd/env.py (HttpdTestEnv.has_directive): Remove; it only
  saw the directives of statically linked modules.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@notroj
notroj merged commit 459e11e into apache:trunk Nov 13, 2026
45 of 46 checks passed
@notroj
notroj deleted the ssl-vhost-policy-test branch November 13, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant