I was failing to get this working with Java 8 – despite it being supported in Java 8.
I eventually found a support statement which says
Enables TLS v1.3 protocol (defined by RFC 8446) in SR6 FP25
however java -version gave me
Java -version gives build 8.0.6.16 – pmz6480sr6fp16-20200902_01(SR6 FP16))
I had Fix Pack 16 and the support is in Fix Pack 25 (from 2020)
Download a more up to date version
The IBM Support page Java SDK Products on z/OS lists the supported version of Java. There is a link to IBM Semeru Runtime Certified Edition for z/OS (Semeru is free production-ready binaries built with the OpenJDK class libraries and the Eclipse OpenJ9 JVM).
When I tried to download V8 SR8, I got a window saying “You cannot download this due to export restrictions”. Next day, I tried again and it worked, the droids working in the background much have found I was a good guy.
Check your java.security file
When I used my own copy of the java.security file it did not work.
I had
security.provider.1=com.ibm.crypto.provider.IBMJCE security.provider.2=com.ibm.crypto.plus.provider.IBMJCEPlus
The latest fix pack Java had
security.provider.1=com.ibm.jsse2.IBMJSSEProvider2 security.provider.2=com.ibm.crypto.provider.IBMJCE security.provider.3=com.ibm.crypto.plus.provider.IBMJCEPlus
The error messages I got were
SEVERE org.apache.catalina.util.LifecycleBase.handleSubClassException
Failed to initialize component Connector HTTP/1.1-6800org.apache.catalina.LifecycleException: Protocol handler initialization failed Caused by: java.lang.IllegalArgumentException: None of the protocols specified are supported by the SSL engine : TLSv1.3
As the support for TLSv1.3 was in JSSE, it is clear (with hindsight) that I needed to specific the provider com.ibm.jsse2.IBMJSSEProvider2!