JMeter - Setting javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword based on application environment
<p>We have 2 environments and for each we have a certificate PFX file.
I tried to import these 2 certs to make one JKS/P12 file and tried to access cert based on alias name. Though I can see 2 entries using the command 
<code>keytool -list -v -keystore "C:/yyyyy/xxxx.jks" -storepass "kdjfkdjfkdjf" &gt; "C:/KeyStoreContents.txt"</code>, I am unable to access any of the cert and seeing the error 'alias not found'.</p>

<p>I there a way to set the values of <code>javax.net.ssl.keyStore</code> and <code>javax.net.ssl.keyStorePassword</code> based on application environment?</p>

<p>I tried to set them in beanshell pre-processor with:</p>

<pre><code>System.setProperty("javax.net.ssl.keyStore","C:/yyyyy/" + pOneTwoName + ".p12");
System.setProperty("javax.net.ssl.keyStorePassword", pOneTwoPwd);
</code></pre>

<p>It didn't work as well.</p>

<p>I also tried <code>${__P(javax.net.ssl.keyStore, C:/yyyyyy/QA.p12)}</code> and <code>${__setProperty(javax.net.ssl.keyStore, C:/yyyyyy/QA.p12)}</code> and none of the above worked.</p>

<p>Is there a way to load these values dynamically before <code>Keystore Configuration</code> element gets executed?</p>