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

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

    Try downloading "Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files" from the Java download site and replacing the files in your JRE.

    This worked for me and I didn't even need to use BouncyCastle - the standard Sun JCE was able to connect to the server.

    PS. I got the same error (ArrayIndexOutOfBoundsException: 64) when I tried using BouncyCastle before changing the policy files, so it seems our situation is very similar.

提交回复
热议问题