The Problem
Client Certificate Authentication is a method of authenticating with the target server using certificates. If you are using 2 way SSL on your target server you may see errors such as the following if you do not have JMeter configured to use client certificates.
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
The Fix
You will need a Java Key Store (JKS) file containing your certificate. We can then configure JMeter to use this JKS file.
One-Off Solution
If you don’t want to override the JMeter configuration you can pass the extra parameters when you start jmeter
jmeter -Djavax.net.ssl.keyStore=/path/to/keystore.jks -Djavax.net.ssl.keyStorePassword=keystore-password-here
Permanent Solution
If you commonly use 2 way SSL you may want to modify the JMeter configuration to make this the default.
If you are using OSX or Linux type the following command to find where your JMeter is installed
$ which jmeter
/opt/jmeter/latest/bin/jmeter
In the same folder there is a configuration file called “system.properties”
Within it, add the following lines
javax.net.ssl.keyStore=/path/to/keystore.jks
javax.net.ssl.keyStorePassword=keystore-password-here