0

I have read multiple questions regarding same issue, but the Java version were different. I got the idea about how it can be enabled in Java 7 and 8. But unfortunately, I am willing to enable it in Java 6.

Already tried to replace the policy jar as suggested in this - https://confluence.atlassian.com/stashkb/list-ciphers-used-by-jvm-679609085.html. But this doesn't help.

My client has enabled this GCM Cipher and I have CBC enabled for my application.

I have a simple question - is it possible to enable GCM for Java 6 with TLS 1.2? If yes, then how?

Error:

        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-3.1.0.RELEASE.jar:                                                                     3.1.0.RELEASE]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_161]
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_161]
        at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_161]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_161]
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206) [na:1.6.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:905) [na:1.6.0_161]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:928) [na:1.6.0_161]
        at java.lang.Thread.run(Thread.java:682) [na:1.6.0_161]
Caused by: java.lang.IllegalArgumentException: Unsupported ciphersuite TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384

I would request to not mark it as duplicate and downgrade, as this is related to specific version of Java. Other question do answer for other versions, but that do not solve my issue.

Karthikeyan Vaithilingam
  • 6,473
  • 10
  • 41
  • 60
Manpreet
  • 67
  • 1
  • 11
  • 1
    First, see [this answer](https://stackoverflow.com/a/48934806/5221149) for how to check if the ciphersuite is even supported by your Java version. If not, then you'd need a third-party library to support it, e.g. [BouncyCastle](https://www.bouncycastle.org/java.html). If it is supported, but not enabled, do a web search to find out how to enable it in Java 6. – Andreas Feb 03 '20 at 03:14
  • See also: [How to use TLS 1.2 in Java 6](https://stackoverflow.com/q/33364100/5221149) – Andreas Feb 03 '20 at 03:15
  • As I am using 161, so TLS 1.2 is not a problem here. List of supported Ciphers doesn't contain GCM. So, I guess BouncyCastle is the only option left. – Manpreet Feb 03 '20 at 03:40
  • Java 6 has been EOL for seven years. Why are you still developing new code for it? – Joseph Sible-Reinstate Monica Feb 03 '20 at 03:48
  • @JosephSible-ReinstateMonica I agree with your point. My application will sun set in next few months and I have migrated to Java 8 for new application. But I have to support client for these few months, until they completely move to my new application. – Manpreet Feb 03 '20 at 04:07
  • @Bhakt cant blame you i've been there. – Karthikeyan Vaithilingam Feb 03 '20 at 11:22
  • @KarthikeyanVaithilingam did you used BouncyCastel in past? – Manpreet Feb 03 '20 at 15:11

0 Answers0