Thursday, October 2, 2008

HTTPS Requests in JMeter with JDK 1.6

Steps to make HTTPS requests work in JMeter as follows

1. Export your personal certificate in .cer format from browser. I exported my personal certificate in c:\temp-ankur.cer. Also you may need to import the root ceritifcate of you ceritificate provider(If provider is custom).Like in my case it was BBS.
2. Import the certificate in default cacerts file with following command
keytool -importcert -keystore C:/Programfiler/Java/jdk1.6.0/jre/lib/security/cacerts -storepass changeit -file c:\temp-ankur.cer

3. Import attached root certificate
keytool -importcert -v -keystore C:/Programfiler/Java/jdk1.6.0/jre/lib/security/cacerts -storepass changeit -file c:\cert-bbsid-root.der -alias BBS-ID

4. Modify the systems.properties file as follows
---------------------------------------------------------------------------------------------------
# SSL properties (moved from jmeter.properties)

# Location of the truststore (trusted certificates)
javax.net.ssl.trustStore=C:/Programfiler/Java/jdk1.6.0/jre/lib/security/cacerts

#javax.net.ssl.trustStoreType=PKCS12
# Location of the keystore
#javax.net.ssl.keyStore=c:/test/test.p12
#
#The password to your keystore
javax.net.ssl.keyStorePassword=changeit
--------------------------------------------------------------------------------------------------
If required we need to import all the certifcates from the server for your domain name. For this refer this link http://blogs.sun.com/andreas/entry/no_more_unable_to_find

5 javac InstallCert.java

6 java InstallCert www.xxx.no

Thats all !

Then you can start load test for the HTTPS URLs.

No comments: