0

I am getting following exception javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
Background: I have a java desktop application where I do login with facebook. I have used HttpServer in my code to get the response from facebook. So, when I was trying to login with face book app was giving SSLHandshake exception. So, I generated jssecacerts using InstallCert.java and put the 'jssecacerts' file in the /lib/security. So, now when I'm trying to login with facebook I am getting this exception: javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair

why it is happening and how to resolve it? do I need to do something in the HttpServer instance that I have used to get the response from the facebook?

Abhi
  • 93
  • 2
  • 4
  • 14
  • do you have more of that error message / stack trace? The root cause may be indicated further down. – Thilo Nov 19 '14 at 05:51
  • Thilo here is the last exception from stack trace: Caused by: java.security.InvalidAlgorithmParameterException: Prime size must be multiple of 64, and can only range from 512 to 1024 (inclusive) how to increase the range of prime size? will it solve the problem? – Abhi Nov 19 '14 at 05:58
  • Seems like its a bug in Java (see linked thread), apparently fixed in recent Java updates. What JVM are you using? Try updating it if possible. – Thilo Nov 19 '14 at 13:07

0 Answers0