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

前端 未结 21 1195
梦如初夏
梦如初夏 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:34

    You can installing the provider dynamically:

    1) Download these jars:

    • bcprov-jdk15on-152.jar
    • bcprov-ext-jdk15on-152.jar

    2) Copy jars to WEB-INF/lib (or your classpath)

    3) Add provider dynamically:

    import org.bouncycastle.jce.provider.BouncyCastleProvider;

    ...

    Security.addProvider(new BouncyCastleProvider());

提交回复
热议问题