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

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

    It is possible that you have incorrect Maven dependencies. You must find these libraries in Maven dependency hierarchy:

    bcprov-jdk14, bcpkix-jdk14, bcmail-jdk14
    

    If you have these dependencies that is the error, and you should do this:

    Add the dependency:

    
        org.bouncycastle
        bcmail-jdk15on
        1.59
    
    

    Exclude these dependencies from the artifact that included the wrong dependencies, in my case it is:

    
        com.lowagie
        itext
        2.1.7
        
            
                org.bouncycastle
                bctsp-jdk14                
            
            
                bouncycastle
                bcprov-jdk14               
            
            
                bouncycastle
                bcmail-jdk14               
            
               
    
    

提交回复
热议问题