SSL certificate

610 views
Skip to first unread message

Enwar Ali

unread,
Feb 1, 2019, 4:01:49 PM2/1/19
to jmeter-plugins
Hi, 

I have error on ssl certifcate application in Jmeter. 
I follow the step converted my pfx certificate to jks file. and set the path and password to jmeter system.property file, and add keystore configuration add alias(my certificate username), alias start 0, and end to 10000 , preload set true, but not sure which step i am missing. 
I get bellow error. Please leave comment if you guys knows the solution. 

Thanks 

Enwar 

javax.net.ssl.SSLException: java.lang.IllegalArgumentException: No var called 'enwar_0922' found
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.SSLSocketImpl.fatal(Unknown Source)
at sun.security.ssl.SSLSocketImpl.handleException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:396)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:92)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:331)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:394)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:832)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:570)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: No var called 'alie_0922' found
at org.apache.jmeter.util.keystore.JmeterKeyStore.getAlias(JmeterKeyStore.java:199)
at org.apache.jmeter.util.JsseSSLManager$WrappedX509KeyManager.chooseClientAlias(JsseSSLManager.java:382)
at sun.security.ssl.ClientHandshaker.serverHelloDone(Unknown Source)
at sun.security.ssl.ClientHandshaker.processMessage(Unknown Source)
at sun.security.ssl.Handshaker.processLoop(Unknown Source)
at sun.security.ssl.Handshaker.process_record(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
... 25 more

gli...@gmail.com

unread,
Feb 4, 2019, 9:09:46 AM2/4/19
to jmeter-plugins
  1. This forum is dedicated to JMeter Plugins related discussions, since your question  is about core JMeter you should raise it in JMeter Forum
  2. There is no need to convert the certificate from .pfx to .jks, .pfx is a PKCS 12 certificate and JMeter supports it out of the box
  3. If you have only one certificate in the keystore you don't need to add the Keystore Configuration, it will be quite enough to specify the following system.properties
javax.net.ssl.keyStoreType=pkcs12    
javax
.net.ssl.keyStore=/path/to/your/certificate.pfx
javax
.net.ssl.keyStorePassword=certificate_password


See How to Set Your JMeter Load Test to Use Client Side Certificates article for more information on setting up HTTP requests encryption in JMeter tests. 

Enwar Ali

unread,
Feb 4, 2019, 4:09:26 PM2/4/19
to jmeter-...@googlegroups.com
Hi,
Thanks for your repose. I followed the example ,but i still get error . I don`t know if the certificate behavior is different . There are some information about the certificate. 
CN = Com UAT FIS Signing CA 4
DC = comtest
DC = com
 KeyID = 53 25 68 5a 7e f7 de b6 8c 6b 1e 
[1]CRL Distribution Point
     Distribution Point Name:
          Full Name:
[1]Authority Info Access
     Access Method=Certification Authority Issuer (1.2.3.60.1.5.2)
     Alternative Name:
Client Authentication (1.3.6.3.2)
Unknown Key Usage (1.3.6.3.4)
[1]Certificate Policy:
     Policy Identifier=1.3.6.46.1.1.15
[2]Certificate Policy:
     Policy Identifier=1.0.11.1.0.18
Digital Signature (80)

Thanks 

java.lang.IllegalArgumentException: Could not create keystore: pkcs12     not found
at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:123)
at org.apache.jmeter.util.JsseSSLManager.createContext(JsseSSLManager.java:214)
at org.apache.jmeter.util.JsseSSLManager.getContext(JsseSSLManager.java:176)
at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.getSSLSocketFactory(HttpSSLProtocolSocketFactory.java:112)
at org.apache.jmeter.util.HttpSSLProtocolSocketFactory.createSocket(HttpSSLProtocolSocketFactory.java:179)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:365)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:355)
at org.apache.jmeter.protocol.http.sampler.hc.LazyLayeredConnectionSocketFactory.connectSocket(LazyLayeredConnectionSocketFactory.java:92)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl$JMeterDefaultHttpClientConnectionOperator.connect(HTTPHC4Impl.java:331)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:373)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:394)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:237)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:185)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.executeRequest(HTTPHC4Impl.java:832)
at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:570)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:67)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1231)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1220)
at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:622)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:546)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:486)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:253)
at java.lang.Thread.run(Unknown Source)
Caused by: java.security.KeyStoreException: pkcs12     not found
at java.security.KeyStore.getInstance(Unknown Source)
at org.apache.jmeter.util.keystore.JmeterKeyStore.<init>(JmeterKeyStore.java:84)
at org.apache.jmeter.util.keystore.JmeterKeyStore.getInstance(JmeterKeyStore.java:262)
at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:119)
... 27 more
Caused by: java.security.NoSuchAlgorithmException: pkcs12     KeyStore not available
at sun.security.jca.GetInstance.getInstance(Unknown Source)
at java.security.Security.getImpl(Unknown Source)
... 31 more

--
You received this message because you are subscribed to the Google Groups "jmeter-plugins" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jmeter-plugin...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages