无法记录使用 SSL 证书的 https 网站

Unable to record https website which uses SSL certificate

SSL Certificate issue

大家好,

在尝试使用 JMeter 记录特定的 https 网站时,我最终得到 javax.net.ssl.SSLHandshakeException。 [请查看所附的屏幕截图]。

我已经阅读了遇到相同问题的人发布的解决方案。但我没有找到明确的解决方案。任何人都可以帮助我如何记录而不会出现此异常。

我尝试在 user.properties 中使用一些命令,但没有用。

根据HTTP Request sampler documentation

Note: Certificates does not conform to algorithm constraints

You may encounter the following error: java.security.cert.CertificateException: Certificates does not conform to algorithm constraints if you run a HTTPS request on a web site with a SSL certificate (itself or one of SSL certificates in its chain of trust) with a signature algorithm using MD2 (like md2WithRSAEncryption) or with a SSL certificate with a size lower than 1024 bits.

This error is related to increased security in Java 7 version u16 (MD2) and version u40 (Certificate size lower than 1024 bits), and Java 8 too.

To allow you to perform your HTTPS request, you can downgrade the security of your Java installation by editing the Java jdk.certpath.disabledAlgorithms property. Remove the MD2 value or the constraint on size, depending on your case.

This property is in this file:

JAVA_HOME/jre/lib/security/java.security

有关详细信息,请参阅 Bug 56357 - Certificates does not conform to algorithm constraints: Adding a note to indicate how to remove of the Java installation these new security constraints 问题。


您可能会发现使用 JMeter Chrome Extension 作为记录 JMeter 测试的替代选项更容易。