Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JMeter load client-side certificate

I try to add a p12 file to JMeter 3.3 configuration to reach a site. I added following lines to system.properties file:

javax.net.ssl.keyStoreType=pkcs12    
javax.net.ssl.keyStore=C:\certs\mycert.p12
javax.net.ssl.keyStorePassword=mypassword

After that I restarted JMeter, but got the same error, javax.net.ssl.SSLHandshakeException. I converted p12 file with keytool to jks and added the following lines to same file by replacing previous ones.

javax.net.ssl.keyStore=C:\certs\mycert.jks
javax.net.ssl.keyStorePassword=mypassword

Error message is the same in this case too:

Response code: Non HTTP response code: javax.net.ssl.SSLHandshakeException Response message: Non HTTP response message: Received fatal alert: handshake_failure

I use HTTP Client 4 as implementation for HTTP Samplers. When I import same certificate to browser, it is working correctly.

I tried to follow this tutorial too: How to configure JMeter to use client side SSL

like image 516
plaidshirt Avatar asked Dec 06 '17 12:12

plaidshirt


People also ask

How do I hit https URL in JMeter?

How to Configure and Use the JMeter HTTP Request. To add an HTTP Request, add a Thread Group, and then right-click on Thread Group -> Add -> Sampler -> HTTP Request (see figure 1).

What is SSL in JMeter?

The SSLManager handles the KeyStore information for JMeter. Basically, it handles all the logic for loading and initializing all the JSSE parameters and selecting the alias to authenticate against if it is available.


1 Answers

You can use Options -> SSL Manager option, where you can select your .p12 file to be used in current Test plan.

like image 64
plaidshirt Avatar answered Sep 21 '22 07:09

plaidshirt