plaidshirt
plaidshirt

Reputation: 5671

Save SSL certificate in JMeter

I have a p12 file, which is needed to execute tests. I added following lines to system.properties file.

javax.net.ssl.keyStoreType=pkcs12    
javax.net.ssl.keyStore=C:\certs\certificate.p12
javax.net.ssl.keyStorePassword=certificate_password

It was not working, so I created jks file from certificate with keytool and set it in the same file.

javax.net.ssl.keyStore=C:\certs\keystore.jks
javax.net.ssl.keyStorePassword=certificate_password

I used CSV Data Set Config to set also alias, which is used in Keystore Configuration component, but not sure, what should be stored in csv data file, how to provide key aliasses. Options -> SSL Manager stores certificates until JMeter is closed, doesn't store those permanently.

Upvotes: 0

Views: 542

Answers (1)

Dmitri T
Dmitri T

Reputation: 168092

  1. For example you have the csv file holding aliases aliases.csv looking like:

    alias1
    alias2
    alias3
    etc.
    
  2. So you can add CSV Data Set Config to read this file and store the alias value into, say alias variable

    JMeter CSV Data Set

  3. And finally you can use alias variable value in the Keystore Configuration which will refer the value of the alias from the CSV file:

    JMeter Keystore with Variable

More information: How to Use Multiple Certificates When Load Testing Secure Websites

Upvotes: 1

Related Questions