javax.net.ssl.SSLHandshakeException: handshake_failure when using JMeter with SSL (JDK8)

前端 未结 6 827
无人共我
无人共我 2020-12-15 01:24

I am writing a JMeter test plan to connect to SSL port (Tomcat Connector). I receive a SSLHandshakeException (handshake_failure) when connecting to SSL port using any of the

6条回答
  •  难免孤独
    2020-12-15 02:08

    There is a solution that allows JMeter to connect to insecure endpoints (or those that use old or not secured enough protocols):

    • Find your JRE;
    • Open jre\lib\security\ folder;
    • Make a backup copy of java.security file;
    • Edit java.security file and comment out all lines that disable insecure algorithms - search for 'disabledAlgorithms' string (don't forget to comment out both lines in multiline settings), they look like:

    jdk.certpath.disabledAlgorithms=MD2, MD5, RSA keySize < 1024, \ DSA keySize < 1024, EC keySize < 224

    • save the file and restart JMeter.

    Java connections are now allowed to use old protocols, so JMeter can properly work.

    REMEMBER it's security!

    These settings are global, and will affect all programs that use the same JRE. If you found this fix works and useful for your system, DO create a copy of your JRE, and set a path to it in jmeter.bat. Return your global settings from backed up copy of java.security file.

提交回复
热议问题