Skip to content

Improvements and alignment to JMeter for SSL KeyStore and TrustStore support.#112

Open
3dgiordano wants to merge 4 commits into
developmentfrom
KEYSTORE_RELATIVE
Open

Improvements and alignment to JMeter for SSL KeyStore and TrustStore support.#112
3dgiordano wants to merge 4 commits into
developmentfrom
KEYSTORE_RELATIVE

Conversation

@3dgiordano

@3dgiordano 3dgiordano commented May 29, 2026

Copy link
Copy Markdown
Collaborator

This pull request enhances SSL/TLS handling in the HTTP Jetty client for JMeter, focusing on robust and accurate support for filesystem keystore/truststore configuration, improved parity with JMeter’s SSLManager, and better test coverage for PKIX and trust-all scenarios. The main changes include introducing a utility for keystore path/type resolution, updating the SSL context factory to use this utility and override trust manager behavior, and adding comprehensive tests to verify these behaviors.

Keystore and Truststore Path/Type Resolution:

  • Introduced the SslStorePathResolver utility to convert javax.net.ssl.* store paths to Jetty-compatible file: URIs and to resolve keystore/truststore types based on file extension or system properties, matching JMeter’s logic.
  • Updated JMeterJettySslContextFactory to use SslStorePathResolver for setting keystore/truststore paths and types, including logging for debugging and handling of PKCS#11/NONE sentinel values. [1] [2]

Trust Manager Handling and JMeter Parity:

  • Overrode getTrustManagers in JMeterJettySslContextFactory to ensure that when "trust all" is enabled, Jetty uses TRUST_ALL_CERTS, preventing unwanted PKIX validation even when a keystore is configured, thus matching JMeter’s behavior.

Logging and Debugging Improvements:

  • Added conditional logging for connection and ALPN lines based on the debug log setting, reducing unnecessary log output. [1] [2]

Test Coverage and Infrastructure:

  • Added new tests for JMeterJettySslContextFactory to verify correct construction with file-based and PKCS#11 keystores, and to check trust manager behavior.
  • Added a simulation test (SslPkixSimulationTest) to reproduce PKIX failures and verify that the new trust manager override logic prevents them, ensuring successful handshakes and HTTP/2 requests when expected.
  • Updated test server builder to allow explicit filesystem keystore configuration for more flexible test scenarios. [1] [2] [3]
  • Ensured SSLManager is reset after relevant tests to avoid cross-test contamination. [1] [2]

These changes significantly improve the reliability and correctness of SSL/TLS configuration and validation in the HTTP/2 Jetty client for JMeter, particularly in complex or edge-case environments.

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

@3dgiordano 3dgiordano changed the title Relative path support for SSL KeyStore/TrustStore Improvements and alignment to JMeter for SSL KeyStore and TrustStore support. Jun 11, 2026
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.

3 participants