Skip to content

Add TLS version mismatch tests to TestSSLHostConfigProtocol to verify…#973

Merged
dsoumis merged 1 commit intoapache:mainfrom
dsoumis:ssl_host_conf
Mar 31, 2026
Merged

Add TLS version mismatch tests to TestSSLHostConfigProtocol to verify…#973
dsoumis merged 1 commit intoapache:mainfrom
dsoumis:ssl_host_conf

Conversation

@dsoumis
Copy link
Copy Markdown
Member

@dsoumis dsoumis commented Mar 31, 2026

… handshake failure when server and client support different protocol versions

… handshake failure when server and client support different protocol versions
@dsoumis dsoumis merged commit 655135b into apache:main Mar 31, 2026
6 checks passed
@dsoumis dsoumis deleted the ssl_host_conf branch March 31, 2026 14:06
SSLContext sc = SSLContext.getInstance(Constants.SSL_PROTO_TLSv1_3);
sc.init(null, new TrustManager[] { new TesterSupport.TrustAllCerts() }, null);
TesterSupport.ClientSSLSocketFactory clientSSLSocketFactory = new TesterSupport.ClientSSLSocketFactory(sc.getSocketFactory());
clientSSLSocketFactory.setProtocols(new String[] { Constants.SSL_PROTO_TLSv1_3 });
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client and server have different style interfaces (SSLHostConfig String vs TesterSupport String[]). Is this intentional? If it good/okay, or should we align them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's intentional in the test scenario because String[] is expected in SSLSocket.setEnabledProtocols(String[] protocols). SSLHostConfig.setProtocols(String input) on the other hand, delimits values from a single string. I suppose we are good as it is.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using an array in xml would not be ideal.. :/

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.

2 participants