Skip to content

Enable TLS hostname verification in TNonblockingSSLSocket#3396

Merged
Jens-G merged 1 commit intoapache:masterfrom
Jens-G:p3-java-nonblocking-hostname
Apr 14, 2026
Merged

Enable TLS hostname verification in TNonblockingSSLSocket#3396
Jens-G merged 1 commit intoapache:masterfrom
Jens-G:p3-java-nonblocking-hostname

Conversation

@Jens-G
Copy link
Copy Markdown
Member

@Jens-G Jens-G commented Apr 14, 2026

Summary

  • Sets EndpointIdentificationAlgorithm to HTTPS on the SSLEngine parameters in the TNonblockingSSLSocket constructor, so the server certificate CN/SAN is validated against the target hostname during the TLS handshake.
  • Follow-up to Enable TLS hostname verification in TSSLTransportFactory #3390, which added the same behavior to the sync client in TSSLTransportFactory.createClient(). Before this change, the async SSL client path (via SSLEngine) did not set the endpoint identification algorithm, leaving the two client paths inconsistent. This was pointed out in #3390 (comment).

Client: java

Test plan

  • Existing Java SSL/nonblocking tests pass
  • Manual smoke test: async SSL client connects to a server whose certificate matches the target hostname
  • Manual smoke test: async SSL client rejects a server whose certificate CN/SAN does not match the target hostname

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Client: java

Set EndpointIdentificationAlgorithm to HTTPS on the SSLEngine parameters
in the TNonblockingSSLSocket constructor so that the server certificate
CN/SAN is validated against the target hostname during the TLS handshake.
This mirrors the behavior of TSSLTransportFactory.createClient() and
aligns the async SSL client with the sync client.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mergeable mergeable bot added the java Pull requests that update Java code label Apr 14, 2026
@Jens-G Jens-G merged commit e0b8309 into apache:master Apr 14, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant