0

We are trying to get our J2EE hosting environment (Jboss 7.1.3.AS) working with our test SalesForce instance. We are running Java 6 v 111

java version "1.6.0_111"
Java(TM) SE Runtime Environment (build 1.6.0_111-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.111-b01, mixed mode)

Note that this version supports TLS v1.1 (https://stackoverflow.com/questions/33364100/how-to-use-tls-1-2-in-java-6). I have added this param on startup

 -Dhttps.protocols=TLSv1.1,TLSv1.2

However, when we start up our server with our Java SalesForce client, we get the following exception …

Caused by: com.sforce.ws.ConnectionException: Failed to send request to https://test.salesforce.com/services/Soap/c/33.0/28390000001928X
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:121) [force-wsc-uber-33.0.2.jar:]
        at com.sforce.soap.enterprise.EnterpriseConnection.login(EnterpriseConnection.java:1095) [enterprise-1.2.jar:]
        at com.sforce.soap.enterprise.EnterpriseConnection.<init>(EnterpriseConnection.java:385) [enterprise-1.2.jar:]
        at com.sforce.soap.enterprise.Connector.newConnection(Connector.java:27) [enterprise-1.2.jar:]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.6.0_111]
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [rt.jar:1.6.0_111]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [rt.jar:1.6.0_111]
        at java.lang.reflect.Method.invoke(Method.java:597) [rt.jar:1.6.0_111]
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:160) [spring-beans-3.2.11.RELEASE.jar:3.2.11.RELEASE]
        ... 75 more
Caused by: javax.net.ssl.SSLException: java.security.ProviderException: java.security.InvalidAlgorithmParameterException: Only SSL 3.0, TLS 1.0, and TLS 1.1 supported
        at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:188) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1863) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1824) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(SSLSocketImpl.java:1807) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1329) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1306) [jsse.jar:1.6.0_111]
        at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:476) [jsse.jar:1.6.0_111]
        at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166) [jsse.jar:1.6.0_111]
        at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1033) [rt.jar:1.6.0_111]
        at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230) [jsse.jar:1.6.0_111]
        at com.sforce.ws.transport.JdkHttpTransport.connectRaw(JdkHttpTransport.java:136) [force-wsc-uber-33.0.2.jar:]
        at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:100) [force-wsc-uber-33.0.2.jar:]
        at com.sforce.ws.transport.JdkHttpTransport.connectLocal(JdkHttpTransport.java:95) [force-wsc-uber-33.0.2.jar:]
        at com.sforce.ws.transport.JdkHttpTransport.connect(JdkHttpTransport.java:91) [force-wsc-uber-33.0.2.jar:]
        at com.sforce.ws.transport.SoapConnection.send(SoapConnection.java:95) [force-wsc-uber-33.0.2.jar:]
        ... 83 more
Caused by: java.security.ProviderException: java.security.InvalidAlgorithmParameterException: Only SSL 3.0, TLS 1.0, and TLS 1.1 supported
        at com.sun.net.ssl.internal.ssl.Handshaker.calculateMasterSecret(Handshaker.java:995) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.Handshaker.calculateKeys(Handshaker.java:948) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:957) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:287) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:817) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:753) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:989) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1295) [jsse.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1322) [jsse.jar:1.6.0_111]
        ... 93 more
Caused by: java.security.InvalidAlgorithmParameterException: Only SSL 3.0, TLS 1.0, and TLS 1.1 supported
        at com.sun.crypto.provider.TlsMasterSecretGenerator.engineInit(TlsMasterSecretGenerator.java:53)
        at javax.crypto.KeyGenerator.init(KeyGenerator.java:406) [jce.jar:1.6.0_111]
        at javax.crypto.KeyGenerator.init(KeyGenerator.java:382) [jce.jar:1.6.0_111]
        at com.sun.net.ssl.internal.ssl.Handshaker.calculateMasterSecret(Handshaker.java:984) [jsse.jar:1.6.0_111]

What version of TLS is SalesForce expecting, and how should we configure our Java environment to use it? Note that it is sadly not an option to upgrade past Java 6 at this time. - Dave

0

Salesforce is expecting TLS 1.1 or 1.2.

I'm pretty sure that your specific Java build only supports TLS 1.1 (but maybe I missed the relevant info in your link). It looks like 1.2 support is in 1.6.0_115-b32.

http://www.oracle.com/technetwork/java/javase/overview-156328.html#R160_111

  • Good call. Chagning the param to "-Dhttps.protocols=TLSv1.1" worked. – Dave Nov 3 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.