0

We have a java agent on our server with which we do a POST to a website. This always worked. Yesterday we renewed our SSL certificate and now when posting data again we get this error:

javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair

Any idea how to fix this??

Nuri Ensing
  • 1,899
  • 1
  • 19
  • 42
  • Does the answer for this question help (at least clarify the issue)? https://stackoverflow.com/questions/6851461/why-does-ssl-handshake-give-could-not-generate-dh-keypair-exception – Per Henrik Lausten Sep 11 '18 at 06:30
  • 1
    Yes it worked but did need to do some additional stuff I will post it in the anwser! – Nuri Ensing Sep 11 '18 at 07:05

1 Answers1

0

Firstly check: to clarify

I first put the bcprov-ext-jdk15on-160.jar file in my java/lib/ext and also changed the settings in the java.security (security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider) but after server restart I get a nullpointer exception. Afterwards i downloaded bcprov-ext-jdk15on-1.53.jar from (https://mvnrepository.com/artifact/org.bouncycastle/bcprov-ext-jdk15on/1.53) and the nullpointer exception is gone. Now the java post works again :)

Nuri Ensing
  • 1,899
  • 1
  • 19
  • 42