Why does SSL handshake give 'Could not generate DH keypair' exception?

前端 未结 21 1183
梦如初夏
梦如初夏 2020-11-22 07:46

When I make an SSL connection with some IRC servers (but not others - presumably due to the server\'s preferred encryption method) I get the following exception:

<         


        
21条回答
  •  清歌不尽
    2020-11-22 08:52

    The "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" answer did not work for me but The BouncyCastle's JCE provider suggestion did.

    Here are the steps I took using Java 1.6.0_65-b14-462 on Mac OSC 10.7.5

    1) Download these jars:

    • bcprov-jdk15on-154.jar

    • bcprov-ext-jdk15on-154.jar

    2) move these jars to $JAVA_HOME/lib/ext

    3) edit $JAVA_HOME/lib/security/java.security as follows: security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider

    restart app using JRE and give it a try

提交回复
热议问题