ankita m
ankita m

Reputation: 33

SSL : Testing Server Side certificates using Jmeter

I am working on setting up ssl to secure my end points. I got a test certificate created from my org

  1. I have recieved a .pfx file
  2. I converted it into .pem -----> .der -------> .jks format

We have basic infrastructure to put this .jks file in a folder called ssl and it gets picked up just by using a confg file.

Next I set up Jmeter to test this. Steps Followed

  1. set up a test recorder --> set up an http get request that takes no parameters

2.changed protocol to https ---> given port no ---> set up host and path. This is correct as I have tested it with http and it returns fine.

  1. Now when I try to test it I get an error Certificate_Unknown error.

I have tried searching the internet and StackFlow articles about testing SSL. I also stumbled upon an article which says I need to add the certificate to my java_home cacerts. I havenot been able to successfully test it. Any pointers to what I might be doing wrong or if I could test it in some other way would be very helpful.

I am comparatively new to SSL concepts and just learnt about formats, ssl etc.

Thanks in advance. :)

Upvotes: 1

Views: 612

Answers (1)

Dmitri T
Dmitri T

Reputation: 168072

  1. You don't need to convert .pfx file into .jks as .pfx files are basically PKCS 12 certificates and JMeter supports them out of the box
  2. I fail to see where you "tell" JMeter to use the certificate. If your " basic infrastructure to put this .jks file in a folder called ssl and it gets picked up just by using a confg file" stanza is related to JMeter - you should address this question to the "infrastructure" providers. Otherwise you need to explicitly configure JMeter to use the certificate. Just add the next lines to system.properties file:

    javax.net.ssl.keyStoreType=pkcs12    
    javax.net.ssl.keyStore=/path/to/certificate.pfx
    javax.net.ssl.keyStorePassword=your certificate password
    

    JMeter restart will be required to pick the properties up.

Upvotes: 1

Related Questions