Forum Discussion

freeMe's avatar
17 years ago

SSL Exception thrown accessing SOAPUI from Firefox

Thought I'd post this since it's something that's bugged me since 3.0 came out.  After creating a mock service and enabling SSL with a self-signed cert whenever I tried to access soapui using https from Firefox I received the error below.  I finally found someone with a similar problem using Tomcat.  The solution there was to swap the existing bouncy castle jar,  bcprov-jdk15-143.jar, with a newer one, bcprov-jdk16-144.jar.  I tried the same in SOAPUI 3.5 Beta and sure enough it resolved the issue.

javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair
  at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.handleException(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(Unknown Source)
  at org.mortbay.jetty.security.SslSocketConnector$SslConnection.run(SslSocketConnector.java:631)
  at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
  Caused by: java.lang.RuntimeException: Could not generate DH keypair
  at com.sun.net.ssl.internal.ssl.ECDHCrypt.(Unknown Source)
  at com.sun.net.ssl.internal.ssl.ServerHandshaker.setupEphemeralECDHKeys(Unknown Source)
  at com.sun.net.ssl.internal.ssl.ServerHandshaker.trySetCipherSuite(Unknown Source)
  at com.sun.net.ssl.internal.ssl.ServerHandshaker.chooseCipherSuite(Unknown Source)
  at com.sun.net.ssl.internal.ssl.ServerHandshaker.clientHello(Unknown Source)
  at com.sun.net.ssl.internal.ssl.ServerHandshaker.processMessage(Unknown Source)
  at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Unknown Source)
  at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(Unknown Source)
  at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
  ... 4 more
  Caused by: java.security.InvalidAlgorithmParameterException: unknown curve name: 1.2.840.10045.3.1.7
  at org.bouncycastle.jce.provider.asymmetric.ec.KeyPairGenerator$EC.initialize(Unknown Source)
  ... 14 more

5 Replies

  • cognophile's avatar
    cognophile
    New Contributor
    Thanks for posting this information.  Very helpful.

    In my case a mock service in SoapUI 3.0.1 was having problems using SSL with JDK 1.5.  Intermittently, when the mock service started, it would use HTTP instead of HTTPS, but no error message was written to the jetty log.

    After updating to JDK 1.6, the "Could not generate DH keypair" message appeared in the jetty log when attempting to access the mock service via HTTPS.

    I updated to bcprov-jdk15-144.jar, and that appears to have fixed the problem (now using JDK 1.6).
  • Hi!

    Great, thanks for your feedback! The upcoming nightly builds will have upgraded to the 1.5-144 version of the bouncycastle provider..

    regards!

    /Ole
    eviware.com
  • cognophile's avatar
    cognophile
    New Contributor
    I also noticed a minor related problem.  The MockService editor window has a button that "Opens the root WSDL page in a browser".  This button always opens a "http://..." link, but it should open a "https://..." link when the service is using SSL.
  • Hi,


    i am getting following error while sending WSDL request. i have tried replacing latest bcprov-jdk15on-148.jar in C:\Program Files (x86)\SmartBear\soapUI-Pro-4.5.1\lib folder. but its showing the same error. Please help!

    Mon Mar 25 15:14:31 IST 2013:INFO:Error getting response for [doRegister:Request 1]; javax.net.ssl.SSLException: java.lang.RuntimeException: Could not generate DH keypair

    JDK : java version "1.7.0_05"
    Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)

    SOAP UI version : 4.5.1

    Regards,
    Raj