My java 8 application is communicating with other system via rest, secured with TLS1.2.
Last 2 java patches (261, 271) has broken the connection, because they have added some backward compatibility with TLS1.3. During the handshake, it started using some newer signature scheme - rsa_pss_rsae_sha256
instead of, previously workingrsa_pkcs1_sha256
(named SHA256withRSA
in java8u251), which is not working because it's trying to reach my private key (during CertificateVerify
handhake step), which is protected by HSM, thus it's not available to read it.
I would like to disable this new signature scheme, because the older one is still sufficient and it worked on previous java patch and it's also used in a few other connections my application.
I have found this solution - https://bugs.openjdk.java.net/browse/JDK-8227445 but when I set this setting by direct signature scheme name rsa_pss_rsae_sha256
, it didn't work. Do you know what name should I pass there to disable this specific signature scheme (or all rsa_pss_*
signature schemes group)?
CloseableHttpClient
withSSLConnectionSocketFactory
(supported protocols - "TLSv1.2", supported cipher suitesTLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_256_GCM_SHA384, TLS_DHE_RSA_WITH_AES_256_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256
and aDefaultHostnameVerifier
– Conflux"supported signature algorithms": [ecdsa_secp256r1_sha256, rsa_pss_rsae_sha256, rsa_pkcs1_sha256,...
and it's trying to connect using those algorithms in the order the server has returned. – Confluxjava.security
file, which will configure TLS for whole JVM. On JDK 8 and earlier, edit the<java-home>/lib/security/java.security
. All Java TLS changes are in the roadmap - java.com/en/jre-jdk-cryptoroadmap.html. You can find in the release notes/additional information what was changed. I'm not sure if you can override default cipher order in the java somehow - it needs some debugging/testing. – FlindersSSLContext
(or other interface) implementation that supports RSA PSS? – Court