In JMeter I want to use a client certificate without all the overhead of converting the certificate and do not forget to click on the SSL Manger Menu after JMeter restart.
I want the flexibility to use different certificates where ever needed.
The Java Solution here looks very promising. I tried to use a JSR223 PreProcessor with Groovy. This fails with the first line. It was unable to import a standard Java Class.
2017-11-08 16:02:39,139 ERROR o.a.j.m.JSR223PreProcessor: Problem in JSR223 script, JSR223 PreProcessor
javax.script.ScriptException: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Script37.groovy: 1: unable to resolve class java.security.Keystore
@ line 1, column 1.
import java.security.Keystore;
What do I have to do to use standard Java classes?
The whole idea is based on a solution used in SoapUI.
import com.eviware.soapui.settings.SSLSettings
import com.eviware.soapui.model.settings.Settings
import com.eviware.soapui.SoapUI
Settings settings = SoapUI.getSettings()
settings.setString(SSLSettings.KEYSTORE, "../certificates/foo.p12")
settings.setString(SSLSettings.KEYSTORE_PASSWORD , "bar")
settings.reloadSettings()
Will something like this work in JMeter? Which client is used to send the HTTP samplers?