I need to connect to a webservice which only accepts connections established via TLS 1.2. Other versions are not supported.
My test client (soapUI Pro) uses JRE 1.7_45 which - according to the following link - generally supports TLS 1.2 which is not enabled by default for clients. I don't have control over the test client's source code so I need to enable TLS 1.2 via some Java options or else.
http://docs.oracle.com/javase/7/docs/technotes/guides/security/SunProviders.html#tlsprotonote
However I cannot find any information how to enable TLS 1.2 for the JVM.
SOAP Gateway clients can secure data exchanges with SOAP Gateway through HTTPS requests by using the SSL/TLS security protocol. Similarly, SSL/TLS connections are supported between SOAP Gateway and IMS™ Connect.
1. Click on: Start -> Control Panel -> Internet Options 2. Click on the Advanced tab 3. Scroll to the bottom and check the TLS version described in steps 3 and 4: 4.
The following parameter must be added to the soapUI vmoptions file in soapUI's bin directory:
-Dsoapui.https.protocols=TLSv1.2
You need to pass the protocol to SSLContext
- docs
SSLContext context = SSLContext.getInstance("TLSv1.2");
You can then use context
to create an SSLEngine
context.createSSLEngine();
Read the JSSE guide on how to make SSL connections using SSLEngine
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With