6

I am testing HTTPS Requests to a custom server using JMeter, but the certificate that the custom server returns in untrusted (as this is a development server). Because of this, the requests fail as it needs a signed/verified CA Certificate.

Is there a way to turn off Jmeter's certificate verification similar to curl (-k option) ?

sidman
  • 213
  • 2
  • 4
  • 15

2 Answers2

4

JMeter does not validate certificates by default, it ignores all certificate errors such as expiry and incorrect hostname. https://cwiki.apache.org/confluence/display/JMETER/JMeterAndHTTPS

If you are still facing this issue, then you can explicitly mention the properties to ignore ssl certificate check. It can be done in two ways,

  1. Add a JMeter start-up configuration. You just have to look for the jmeter.properties file and add the code line ‘server.rmi.ssl.disable=true’

  2. Executing Jmeter through command line by passing parameter to rewrite properties of the configuration files at start-up,

    jmeter -s -Jserver.rmi.ssl.disable=true

Also check if correct headers are passed,

Accept-Enconding= application/json
Content-Type= application/json
Vishal Kharde
  • 1,553
  • 3
  • 16
  • 34
1

You can include the certificate from the development server in Jmeter jvm.

  1. Download the certificate using any of the browsers. Here is a link on how to do this.

  2. Identify the jvm that Jmeter uses. This is generally your JAVA_HOME environment varaible.

  3. Add the certificate to the jvm truststore. Here are the steps.

That should fix it.

Community
  • 1
  • 1
pawinder gupta
  • 1,225
  • 16
  • 35