You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Torsten Krah <kr...@gmail.com> on 2022/03/11 08:35:10 UTC
Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Hi,
I am using Tomcat 9.0.59 and configured it like that:
<SSLHostConfig protocols="TLSv1.2+TLSv1.3" honorCipherOrder="true" ciphers="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_CCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256">
...
</SSLHostConfig>
Output is:
[main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
[main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true], UDS [true].
[main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
[main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1k 25 Mar 2021]
Using testssl I had a look on the ciphers configured and they match my
expectations for TLS 1.2 but the TLS 1.3 ones are ignored - the
standard ciphers activated in openssl are still used according to:
https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites
Output of testssl:
Cipher order
TLSv1.2: ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-GCM-SHA256
TLSv1.3: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256 TLS_AES_128_GCM_SHA256
Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits Cipher Suite Name (IANA/RFC)
-----------------------------------------------------------------------------------------------------------------------------
x1302 TLS_AES_256_GCM_SHA384 ECDH 253 AESGCM 256 TLS_AES_256_GCM_SHA384
x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 253 ChaCha20 256 TLS_CHACHA20_POLY1305_SHA256
xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 253 AESGCM 256 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
x9f DHE-RSA-AES256-GCM-SHA384 DH 4096 AESGCM 256 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
x1301 TLS_AES_128_GCM_SHA256 ECDH 253 AESGCM 128 TLS_AES_128_GCM_SHA256
xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 253 AESGCM 128 TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
x9e DHE-RSA-AES128-GCM-SHA256 DH 4096 AESGCM 128 TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
How to configure the TLS 1.3 ciphers?
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
> -----Ursprüngliche Nachricht-----
> Von: Torsten Krah <kr...@gmail.com>
> Gesendet: Freitag, 11. März 2022 10:30
> An: users@tomcat.apache.org
> Betreff: Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
>
> Am Freitag, dem 11.03.2022 um 09:17 +0000 schrieb Thomas Hoffmann
> (Speed4Trade GmbH):
> > The configuration which works for me is:
> >
> > <Connector port="443"
> > protocol="org.apache.coyote.http11.Http11NioProtocol"
> >
> >
> >
> sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImpl
> > ementation"
> >
> > maxThreads="150" minSpareThreads="25"
> >
> > URIEncoding="UTF-8" useBodyEncodingForURI="false"
> >
> > enableLookups="false" disableUploadTimeout="true"
> >
> > acceptCount="100" scheme="https" secure="true"
> >
> > SSLEnabled="true">
> >
> > <SSLHostConfig ciphers="ECDHE-ECDSA-AES128-GCM-
> > SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-
> > SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-
> > POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-
> SHA256:DHE-
> > RSA-AES256-GCM-SHA384"
> >
> > disab
> > leSessionTickets="true"
> >
> > honor
> > CipherOrder="false"
> >
> > proto
> > cols="+TLSv1.2,+TLSv1.3">
>
>
> I am using:
>
> protocol="org.apache.coyote.http11.Http11Nio2Protocol"
>
> and in combination with the native APR in place it does the correct thing,
> using OpenSSL - and the error shows that this is in place.
>
> The list of protocols can be either of those - see the
> https://tomcat.apache.org/tomcat-9.0-doc/config/http.html ciphers docs:
>
>
> The ciphers to enable using the OpenSSL syntax. (See the OpenSSL
> documentation for the list of ciphers supported and the syntax).
> Alternatively, a comma separated list of ciphers using the standard
> OpenSSL cipher names or the standard JSSE cipher names may be used.
>
>
> Your example does not have any TLS 1.3 cipher listet - so you just get
> the 3 defaults (which I want / need to change) - and as seen in the
> code it won't work anyway, because it does not call:
>
> SSL_CTX_set_ciphersuites()
>
> to set the 1.3 suites.
>
> kind regards
>
> Torsten
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Hello Torsten,
that article seems to confirm your research on this topic:
https://stackoverflow.com/questions/68802712/tomcat-9-0-48not-starting-with-tlsv1-3-and-explicit-ciphers-in-server-xml-ssl
Seems to only work with Java implementation, not with openssl at the moment.
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Am Freitag, dem 11.03.2022 um 09:17 +0000 schrieb Thomas Hoffmann
(Speed4Trade GmbH):
> The configuration which works for me is:
>
> <Connector port="443"
> protocol="org.apache.coyote.http11.Http11NioProtocol"
>
>
> sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImpl
> ementation"
>
> maxThreads="150" minSpareThreads="25"
>
> URIEncoding="UTF-8" useBodyEncodingForURI="false"
>
> enableLookups="false" disableUploadTimeout="true"
>
> acceptCount="100" scheme="https" secure="true"
>
> SSLEnabled="true">
>
> <SSLHostConfig ciphers="ECDHE-ECDSA-AES128-GCM-
> SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-
> SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-
> POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-
> RSA-AES256-GCM-SHA384"
>
> disab
> leSessionTickets="true"
>
> honor
> CipherOrder="false"
>
> proto
> cols="+TLSv1.2,+TLSv1.3">
I am using:
protocol="org.apache.coyote.http11.Http11Nio2Protocol"
and in combination with the native APR in place it does the correct
thing, using OpenSSL - and the error shows that this is in place.
The list of protocols can be either of those - see the
https://tomcat.apache.org/tomcat-9.0-doc/config/http.html ciphers docs:
The ciphers to enable using the OpenSSL syntax. (See the OpenSSL
documentation for the list of ciphers supported and the syntax).
Alternatively, a comma separated list of ciphers using the standard
OpenSSL cipher names or the standard JSSE cipher names may be used.
Your example does not have any TLS 1.3 cipher listet - so you just get
the 3 defaults (which I want / need to change) - and as seen in the
code it won't work anyway, because it does not call:
SSL_CTX_set_ciphersuites()
to set the 1.3 suites.
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
> -----Ursprüngliche Nachricht-----
> Von: Torsten Krah <kr...@gmail.com>
> Gesendet: Freitag, 11. März 2022 10:01
> An: users@tomcat.apache.org
> Betreff: Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
>
> Am Freitag, dem 11.03.2022 um 08:52 +0000 schrieb Thomas Hoffmann
> (Speed4Trade GmbH):
> > Hello,
> >
> > the protocol attribute looks a bit strange.
> >
> > I think it should be:
> >
> > protocols="+TLSv1.2,+TLSv1.3">
>
> I tried standalone TLS 1.3 like you suggested:
>
> protocols="+TLSv1.3"
>
> still the same exception:
>
>
> 11-Mar-2022 09:57:41.996 WARNUNG [main]
> org.apache.tomcat.util.net.openssl.OpenSSLContext.init Fehler beim
> initialisieren des SSL Contexts
> java.lang.Exception: Unable to configure permitted SSL ciphers
> (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)
>
>
> kind regards
>
> Torsten
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Hello,
Java and openssl uses different naming. So sslImplementationName is also important.
The configuration which works for me is:
<Connector port="443" protocol="org.apache.coyote.http11.Http11NioProtocol"
sslImplementationName="org.apache.tomcat.util.net.openssl.OpenSSLImplementation"
maxThreads="150" minSpareThreads="25"
URIEncoding="UTF-8" useBodyEncodingForURI="false"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
SSLEnabled="true">
<SSLHostConfig ciphers="ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384"
disableSessionTickets="true"
honorCipherOrder="false"
protocols="+TLSv1.2,+TLSv1.3">
...
Greetings, Thomas
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Am Freitag, dem 11.03.2022 um 08:52 +0000 schrieb Thomas Hoffmann
(Speed4Trade GmbH):
> Hello,
>
> the protocol attribute looks a bit strange.
>
> I think it should be:
>
> protocols="+TLSv1.2,+TLSv1.3">
I tried standalone TLS 1.3 like you suggested:
protocols="+TLSv1.3"
still the same exception:
11-Mar-2022 09:57:41.996 WARNUNG [main] org.apache.tomcat.util.net.openssl.OpenSSLContext.init Fehler beim initialisieren des SSL Contexts
java.lang.Exception: Unable to configure permitted SSL ciphers (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
AW: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by "Thomas Hoffmann (Speed4Trade GmbH)" <Th...@speed4trade.com.INVALID>.
> -----Ursprüngliche Nachricht-----
> Von: Torsten Krah <kr...@gmail.com>
> Gesendet: Freitag, 11. März 2022 09:35
> An: users@tomcat.apache.org
> Betreff: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
>
> Hi,
>
> I am using Tomcat 9.0.59 and configured it like that:
>
>
> <SSLHostConfig protocols="TLSv1.2+TLSv1.3" honorCipherOrder="true"
> ciphers="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES
> _128_CCM_SHA256,TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,TLS_EC
> DHE_RSA_WITH_AES_128_GCM_SHA256,TLS_DHE_RSA_WITH_AES_256_GC
> M_SHA384,TLS_DHE_RSA_WITH_AES_128_GCM_SHA256">
> ...
> </SSLHostConfig>
>
> Output is:
>
> [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded
> Apache Tomcat Native library [1.2.31] using APR version [1.7.0].
> [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR
> capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true],
> UDS [true].
> [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent
> APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
> [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL
> successfully initialized [OpenSSL 1.1.1k 25 Mar 2021]
>
>
> Using testssl I had a look on the ciphers configured and they match my
> expectations for TLS 1.2 but the TLS 1.3 ones are ignored - the standard
> ciphers activated in openssl are still used according to:
>
> https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites
>
> Output of testssl:
>
> Cipher order
> TLSv1.2: ECDHE-RSA-AES256-GCM-SHA384 ECDHE-RSA-AES128-GCM-
> SHA256 DHE-RSA-AES256-GCM-SHA384 DHE-RSA-AES128-GCM-SHA256
> TLSv1.3: TLS_AES_256_GCM_SHA384 TLS_CHACHA20_POLY1305_SHA256
> TLS_AES_128_GCM_SHA256
>
> Hexcode Cipher Suite Name (OpenSSL) KeyExch. Encryption Bits
> Cipher Suite Name (IANA/RFC)
> ----------------------------------------------------------------------------------------------
> -------------------------------
> x1302 TLS_AES_256_GCM_SHA384 ECDH 253 AESGCM 256
> TLS_AES_256_GCM_SHA384
> x1303 TLS_CHACHA20_POLY1305_SHA256 ECDH 253 ChaCha20 256
> TLS_CHACHA20_POLY1305_SHA256
> xc030 ECDHE-RSA-AES256-GCM-SHA384 ECDH 253 AESGCM 256
> TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
> x9f DHE-RSA-AES256-GCM-SHA384 DH 4096 AESGCM 256
> TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
> x1301 TLS_AES_128_GCM_SHA256 ECDH 253 AESGCM 128
> TLS_AES_128_GCM_SHA256
> xc02f ECDHE-RSA-AES128-GCM-SHA256 ECDH 253 AESGCM 128
> TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
> x9e DHE-RSA-AES128-GCM-SHA256 DH 4096 AESGCM 128
> TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
>
>
> How to configure the TLS 1.3 ciphers?
>
> kind regards
>
> Torsten
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
Hello,
the protocol attribute looks a bit strange.
I think it should be:
protocols="+TLSv1.2,+TLSv1.3">
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Am Dienstag, dem 15.03.2022 um 15:29 +0100 schrieb Rémy Maucherat:
> I used Panama for prototyping, SSL_CTX_set_ciphersuites works but is
>
> not so trivial to use. If you try using the ciphersuite for more than
>
> 1.3, there will be warnings (which I improved), and the default
> Tomcat
>
> uses also does not make sense for 1.3. I wonder if it should revert
> to
>
> not setting anything in that case (which would need some more
>
> changes).
>
>
>
> Rémy
Should I open a bug / feature request in bugzilla to track that
feature?
Torsten
--
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Rémy Maucherat <re...@apache.org>.
On Fri, Mar 11, 2022 at 6:58 PM Christopher Schultz
<ch...@christopherschultz.net> wrote:
>
> Torsten,
>
> On 3/11/22 06:03, Torsten Krah wrote:
> >> It seems to me you are listing a cipher that might be correct
> >> according to the OpenSSL documentation, but then whether that is
> >> available to your JVM may be different.
> >
> > That is for sure not the problem - just use the "ciphers.sh" from the
> > binary directory of tomcat which will list you all possible ciphers you
> > can use - and those match the ones I want to use.
> >
> >>
> >> Maybe you can run some small java application on the very same JVM to
> >> simply list the supported ciphers? At least that would give you an
> >> authorative list of ciphers you can put into the configuration file.
> >
> > No need for that, tomcat already has that - use ciphers.sh .
> >
> > As Thomas found, it is a known bug / missing feature of tomcat - you
> > can't configure TLS 1.3 ciphers in tomcat yet if you want to use the
> > OpenSSL native implementation and Mark Thomas confirmed that here:
> >
> > https://lists.apache.org/thread/q8lmp40xkn0b4k4o6n05n9fyttlvmd22
> >
> > That was 08/2019 - but it still is unsupported in 03/2022 - maybe I'll
> > do a patch for that one ;).
>
> If you do, please make sure you use appropriate #ifdefs in order to
> allow it to compile against multiple versions of OpenSSL, not just
> whatever version you happen to have installed on your local machine.
I used Panama for prototyping, SSL_CTX_set_ciphersuites works but is
not so trivial to use. If you try using the ciphersuite for more than
1.3, there will be warnings (which I improved), and the default Tomcat
uses also does not make sense for 1.3. I wonder if it should revert to
not setting anything in that case (which would need some more
changes).
Rémy
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Christopher Schultz <ch...@christopherschultz.net>.
Torsten,
On 3/11/22 06:03, Torsten Krah wrote:
>> It seems to me you are listing a cipher that might be correct
>> according to the OpenSSL documentation, but then whether that is
>> available to your JVM may be different.
>
> That is for sure not the problem - just use the "ciphers.sh" from the
> binary directory of tomcat which will list you all possible ciphers you
> can use - and those match the ones I want to use.
>
>>
>> Maybe you can run some small java application on the very same JVM to
>> simply list the supported ciphers? At least that would give you an
>> authorative list of ciphers you can put into the configuration file.
>
> No need for that, tomcat already has that - use ciphers.sh .
>
> As Thomas found, it is a known bug / missing feature of tomcat - you
> can't configure TLS 1.3 ciphers in tomcat yet if you want to use the
> OpenSSL native implementation and Mark Thomas confirmed that here:
>
> https://lists.apache.org/thread/q8lmp40xkn0b4k4o6n05n9fyttlvmd22
>
> That was 08/2019 - but it still is unsupported in 03/2022 - maybe I'll
> do a patch for that one ;).
If you do, please make sure you use appropriate #ifdefs in order to
allow it to compile against multiple versions of OpenSSL, not just
whatever version you happen to have installed on your local machine.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
> It seems to me you are listing a cipher that might be correct
> according to the OpenSSL documentation, but then whether that is
> available to your JVM may be different.
That is for sure not the problem - just use the "ciphers.sh" from the
binary directory of tomcat which will list you all possible ciphers you
can use - and those match the ones I want to use.
>
> Maybe you can run some small java application on the very same JVM to
> simply list the supported ciphers? At least that would give you an
> authorative list of ciphers you can put into the configuration file.
No need for that, tomcat already has that - use ciphers.sh .
As Thomas found, it is a known bug / missing feature of tomcat - you
can't configure TLS 1.3 ciphers in tomcat yet if you want to use the
OpenSSL native implementation and Mark Thomas confirmed that here:
https://lists.apache.org/thread/q8lmp40xkn0b4k4o6n05n9fyttlvmd22
That was 08/2019 - but it still is unsupported in 03/2022 - maybe I'll
do a patch for that one ;).
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Hiran CHAUDHURI <hi...@amadeus.com.INVALID>.
CONFIDENTIAL & RESTRICTED
Hello Torsten.
It seems to me you are listing a cipher that might be correct according to the OpenSSL documentation, but then whether that is available to your JVM may be different.
Maybe you can run some small java application on the very same JVM to simply list the supported ciphers? At least that would give you an authorative list of ciphers you can put into the configuration file.
And on another level: Could Tomcat list the supported ciphers as part of the exception text? This would neither consume performance because we are in error state anyway and give a direct hint for all future encounters of this problem.
Hiran
-----Original Message-----
From: Torsten Krah <kr...@gmail.com>
Sent: Friday, March 11, 2022 9:51
To: users@tomcat.apache.org
Subject: Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
CAUTION: External mail. Be careful with links and attachments.
Interesting exception on startup when using TLS 1.3 only - configured the connector like this:
<SSLHostConfig protocols="TLSv1.3" honorCipherOrder="true" ciphers="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_CCM_SHA256">
</SSLHostConfig>
using only TLS 1.3 and the configured ciphers but now I get this on startup:
11-Mar-2022 09:43:42.753 WARNUNG [main] org.apache.tomcat.util.net.openssl.OpenSSLContext.init Fehler beim initialisieren des SSL Contexts
java.lang.Exception: Unable to configure permitted SSL ciphers (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)
at org.apache.tomcat.jni.SSLContext.setCipherSuite(Native Method)
at org.apache.tomcat.util.net.openssl.OpenSSLContext.init(OpenSSLContext.java:329)
at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:245)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
at org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:144)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1240)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:603)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1046)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1042)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
The cipher names does match:
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.openssl.org%2Findex.php%2FTLS1.3%23Ciphersuites&data=04%7C01%7C%7C6906465697414d1c2b3b08da033c40bb%7Cb3f4f7c272ce4192aba4d6c7719b5766%7C0%7C0%7C637825898789079215%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=2KWhK88gs8TleiI1rCujofD%2Fz5t%2B%2F1CUwP0imfcR8bg%3D&reserved=0
and
https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatatracker.ietf.org%2Fdoc%2Fhtml%2Frfc8446%23appendix-B.4&data=04%7C01%7C%7C6906465697414d1c2b3b08da033c40bb%7Cb3f4f7c272ce4192aba4d6c7719b5766%7C0%7C0%7C637825898789079215%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=WUut0yFyPkEaaHrkOwu0Xlcozrowd7sdKdKEiCk4O18%3D&reserved=0
I am lost at that point, maybe someone has an idea.
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
IMPORTANT - CONFIDENTIALITY NOTICE - This e-mail is intended only for the use of the individual or entity shown above as addressees . It may contain information which is privileged, confidential or otherwise protected from disclosure under applicable laws . If the reader of this transmission is not the intended recipient, you are hereby notified that any dissemination, printing, distribution, copying, disclosure or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this transmission in error, please immediately notify us by reply e-mail or using the address below and delete the message and any attachments from your system. Amadeus Data Processing GmbH Geschaftsfuhrer: Sven Fuhrmeister Sitz der Gesellschaft: Erding HR Munchen 212770 Berghamer Strasse 6 85435 Erding Germany.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Am Freitag, dem 11.03.2022 um 10:09 +0100 schrieb Torsten Krah:
> So it seems like a bug to me, right?
I had a quick look on the JNI SSLContext code + the native
implementation:
TCN_IMPLEMENT_CALL(jboolean, SSL, setCipherSuites)(TCN_STDARGS, jlong ssl,
jstring ciphers)
{
jboolean rv = JNI_TRUE;
SSL *ssl_ = J2P(ssl, SSL *);
TCN_ALLOC_CSTRING(ciphers);
UNREFERENCED_STDARGS;
if (ssl_ == NULL) {
TCN_FREE_CSTRING(ciphers);
tcn_ThrowException(e, "ssl is null");
return JNI_FALSE;
}
UNREFERENCED(o);
if (!J2S(ciphers)) {
TCN_FREE_CSTRING(ciphers);
return JNI_FALSE;
}
if (!SSL_set_cipher_list(ssl_, J2S(ciphers))) {
char err[256];
ERR_error_string(SSL_ERR_get(), err);
tcn_Throw(e, "Unable to configure permitted SSL ciphers (%s)", err);
rv = JNI_FALSE;
}
TCN_FREE_CSTRING(ciphers);
return rv;
}
and this one does really use SSL_set_cipher_list even for TLS 1.3 -
that won't work.
Can anyone confirm that? Should I open a bug here:
https://bz.apache.org/bugzilla/enter_bug.cgi
about that?
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Am Freitag, dem 11.03.2022 um 09:50 +0100 schrieb Torsten Krah:
> (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)
Reading that message and looking at:
https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites
there it is written that with TLS 1.3:
Applications should use the SSL_CTX_set_ciphersuites() or SSL_set_ciphersuites() functions to configure TLSv1.3 ciphersuites.
Seems tomcat is using *SSL_CTX_set_cipher_list* instead of
*SSL_CTX_set_ciphersuites* - maybe someone with knowledge here can
confirm that theory.
Reading:
https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set_cipher_list.html
there is this:
SSL_CTX_set_cipher_list() sets the list of available ciphers (TLSv1.2
and below) for ctx using the control string str. The format of the
string is described in openssl-ciphers(1). The list of ciphers is
inherited by all ssl objects created from ctx. This function does not
impact TLSv1.3 ciphersuites. Use SSL_CTX_set_ciphersuites() to
configure those.
So it seems like a bug to me, right?
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Tomcat 9.0.59 - TLS 1.3 cipher configuration ignored (TLS 1.2 ok)
Posted by Torsten Krah <kr...@gmail.com>.
Interesting exception on startup when using TLS 1.3 only - configured
the connector like this:
<SSLHostConfig protocols="TLSv1.3" honorCipherOrder="true" ciphers="TLS_AES_128_GCM_SHA256,TLS_AES_256_GCM_SHA384,TLS_AES_128_CCM_SHA256">
</SSLHostConfig>
using only TLS 1.3 and the configured ciphers but now I get this on startup:
11-Mar-2022 09:43:42.753 WARNUNG [main] org.apache.tomcat.util.net.openssl.OpenSSLContext.init Fehler beim initialisieren des SSL Contexts
java.lang.Exception: Unable to configure permitted SSL ciphers (error:1410D0B9:SSL routines:SSL_CTX_set_cipher_list:no cipher match)
at org.apache.tomcat.jni.SSLContext.setCipherSuite(Native Method)
at org.apache.tomcat.util.net.openssl.OpenSSLContext.init(OpenSSLContext.java:329)
at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:245)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71)
at org.apache.tomcat.util.net.Nio2Endpoint.bind(Nio2Endpoint.java:144)
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1240)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:603)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:80)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1046)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:556)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1042)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:724)
at org.apache.catalina.startup.Catalina.load(Catalina.java:746)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:305)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
The cipher names does match:
https://wiki.openssl.org/index.php/TLS1.3#Ciphersuites
and
https://datatracker.ietf.org/doc/html/rfc8446#appendix-B.4
I am lost at that point, maybe someone has an idea.
kind regards
Torsten
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org