SSL certificate #63
Answered
by
rabelenda
roguefaction
asked this question in
Q&A
|
Hi, is there any way to add an SSL truststore/keystore to HTTP requests in a test plan? Vytautas |
Answered by
rabelenda
Jan 7, 2022
Replies: 1 comment 1 reply
|
Hello, Thank you for asking this question, is a very important one in some scenarios. Have you tried setting Eg: System.setProperty("javax.net.ssl.keyStore", "myKeystore.jks");
System.setProperty("javax.net.ssl.keyStorePassword", "myPass");In general you wouldn't need to define a truststore since jmeter by defaults trusts all keys. If you need you might try with If setting properties programmatically (with <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<configuration>
<argLine>-Djavax.net.ssl.keyStore=myKeystore.jks -Djavax.net.ssl.keyStorePassword=myPass</argLine>
</configuration>
</plugin>
</plugins>
</build>Regards |
1 reply
Answer selected by
roguefaction
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
Thank you for asking this question, is a very important one in some scenarios.
Have you tried setting
javax.net.ssl.keyStoreandjavax.net.ssl.keyStorePasswordjava system properties?Eg:
In general you wouldn't need to define a truststore since jmeter by defaults trusts all keys. If you need you might try with
javax.net.ssl.trustStoresystem property.If setting properties programmatically (with
System.setProperty) you might also try setting it in the JVM that runs the tests, for example, if you use maven: