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

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

    If the server supports a cipher that does not include DH, you can force the client to select that cipher and avoid the DH error. Such as:

    String pickedCipher[] ={"TLS_RSA_WITH_AES_256_CBC_SHA"};
    sslsocket.setEnabledCipherSuites(pickedCipher);
    

    Keep in mind that specifying an exact cipher is prone to breakage in the long run.

提交回复
热议问题