Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tomcat Intermediate configuration (TLS v1.2 + TLS v1.3) not working correctly #280

Open
toby1984 opened this issue Jan 3, 2022 · 1 comment · Fixed by mozilla/ssl-config-generator#253

Comments

@toby1984
Copy link

toby1984 commented Jan 3, 2022

At least on my CentOS7 system with JDK16 (OpenJDK, Temurin)

openjdk version "16.0.2" 2021-07-20
OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7)
OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, sharing)

and Apache Tomcat 9.0.54 (downloaded from tomcat.apache.org) the generated server.xml did not work correctly. I would only ever get TLSv1.2 connections and "openssl s_client -tls1_3 ..." failed.

Enabling SSL debugging on the JVM using -Djavax.net.debug=ssl,handshake printed the following error:

HandshakeContext.java:305|No available cipher suite for TLS13 

I attached a remote debugger to the JVM and stepped through HandshakeContext#getActiveProtocols() and the CipherSuite#supports() calls in

        for (CipherSuite suite : enabledCipherSuites) {
            if (suite.isAvailable() && suite.supports(protocol)) { 

returns FALSE for TLS13 and all cipher suites the SSL configuration generator suggested. To fix this, I had to add the following additional cipher suites to my server.xml:

TLS_AES_128_GCM_SHA256
TLS_AES_256_GCM_SHA384
TLS_CHACHA20_POLY1305_SHA256
janbrasna added a commit to janbrasna/ssl-config-generator that referenced this issue Jan 6, 2024
@janbrasna
Copy link

janbrasna commented Feb 2, 2024

@toby1984 Do you happen to know if this issue is over APR/OpenSSL or JSSE implementation?

This is somewhat tricky as OpenSSL won't control any TLSv1.3-related configuration via the <SSLHostConfig ciphers/> as it uses different APIs for that; on the other hand JSSE treats them equally so if they're not in the list they won't be used for handshake it seems…

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 a pull request may close this issue.

2 participants