0

(note: this is related to this question)

We know that with the non-free Java 1.6_111 update, Java 1.6 can support TLS 1.1 with HTTPS. My question is: should I compile my program with Java 6 111 or just use java 6 111 with the -Dhttps.protocols=TLSv1.1 switch?

Note: I've tried the latter and it doesn't seem to work.

Thanks.

Community
  • 1
  • 1
friol
  • 6,996
  • 4
  • 44
  • 81

1 Answers1

1

Is your code (including libraries you call) is using something like new URL("https://xxx").connect() and NOT SSLSocket or SSLEngine directly? Only the former use the https. properties.

If using JSSE level, I don't pay for extended support and so don't have the code (or source, which IIRC for 6 didn't include crypto anyway), but the release notes only talk about selection by explicit call to .setEnabledProtocols (in code). The release notes for 115 b32 additionally say

The new jdk.tls.client.protocols System Property may also be used to control the protocols in use for a TLS connection. (JDK-8151183)

and 'new' suggests this does not work in 111, but you could try it.

If you do make the code change to call .setEnabledProtocols the method itself already existed, only the argument value changed, so you can compile against any JDK6 and run on 6u111. (But if you unit-test and/or debug on the compile system, you presumably do need 6u111 for those.)

dave_thompson_085
  • 34,712
  • 6
  • 50
  • 70