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

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

    I've got this error with Bamboo 5.7 + Gradle project + Apache. Gradle tried to get some dependencies from one of our servers via SSL.

    Solution:

    1. Generate DH Param:

    with OpenSSL:

    openssl dhparam 1024
    

    example output:

    -----BEGIN DH PARAMETERS-----
    MIGHfoGBALxpfMrDpImEuPlhopxYX4L2CFqQov+FomjKyHJrzj/EkTP0T3oAkjnS
    oCGh6p07kwSLS8WCtYJn1GzItiZ05LoAzPs7T3ST2dWrEYFg/dldt+arifj6oWo+
    vctDyDqIjlevUE+vyR9MF6B+Rfm4Zs8VGkxmsgXuz0gp/9lmftY7AgEC
    -----END DH PARAMETERS-----
    
    1. Append output to certificate file (for Apache - SSLCertificateFile param)

    2. Restart apache

    3. Restart Bamboo

    4. Try to build project again

提交回复
热议问题