javax.net.ssl.SSLHandshakeException

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

javax.net.ssl.SSLHandshakeException

ksaavedra
This post was updated on .
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: javax.net.ssl.SSLHandshakeException

glinius@live.com
Going forward you should provide more information with regards to how you did "convert" your certificate into a Java Keystore as there are several ways and the outcome might be different.

If you have only 1 certificate in the keystore - you don't need the Keystore Configuration, setting path to the keystore and the password will be sufficient, just don't forget to restart JMeter to pick up the change. You can also validate your keystore using SSL Manager (works in GUI mode only)

Keystore Configuration should be used when you have more than one certificate in the keystore and want each thread (virtual user) to use its own client certificate instead of sharing a single one. The index is zero-based so you need to use 0 in both "alias start" and "alias end"

It might also be the case your "key" is password-protected as well so you will need to remove this password so JMeter could extract the certificate from there.

So first of all try inspecting your keystore using keytool command or Keystore Explorer application and verify that the certificate is really there, once done double-check your JMeter configuration, again, for a single certificate you don't need anything but set 2 system properties and restart JMeter.
Reply | Threaded
Open this post in threaded view
|

Re: javax.net.ssl.SSLHandshakeException

ksaavedra
I followed this steps to download the certificate:
1.Click the Secure button (a padlock) in an address bar.
Image for post
2. Click the Certificate(Valid).
Image for post
3. Go to the Details tab
Image for post
4.Click the Copy to File… button
5.Click the Next button.
6.Select the “Base-64 encoded X.509 (.CER)” format and click the Next button.
Image for post
7.Specify the name of the file you want to save the SSL certificate to
8.Click the Next and the Finish buttons

I got the following certificates

added all of them into one keystore using Keystore explorer


in jmeter.properties
set to false
<nabble_embed>https.use.cached.ssl.context=false</nabble_embed>

and checked first with Options -> SSL Manager
pointing to keystore with  extension *jks and also with keystore with extension *pk12
but for both I'm getting the same response
<nabble_embed>020-11-27 16:46:38,458 INFO o.a.j.u.JsseSSLManager: Using default SSL protocol: TLS 2020-11-27 16:46:38,458 INFO o.a.j.u.JsseSSLManager: SSL session context: per-thread 2020-11-27 16:46:38,459 INFO o.a.j.u.SSLManager: JmeterKeyStore Location: f:/backup IDT/IDT/Performance/CSU/PromoAdmin/KeyStoreSSO.p12 type pkcs12 2020-11-27 16:46:38,491 INFO o.a.j.u.SSLManager: KeyStore created OK 2020-11-27 16:46:38,787 ERROR o.a.j.u.SSLManager: Problem loading keystore: No key(s) found java.lang.NullPointerException: No key(s) found at java.util.Objects.requireNonNull(Unknown Source) ~[?:1.8.0_251] at org.apache.jmeter.util.keystore.JmeterKeyStore.load(JmeterKeyStore.java:137) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.util.SSLManager.getKeyStore(SSLManager.java:140) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.util.SSLManager.configureKeystore(SSLManager.java:308) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:100) [ApacheJMeter_components.jar:5.3] at org.apache.jmeter.config.KeystoreConfig.testStarted(KeystoreConfig.java:64) [ApacheJMeter_components.jar:5.3] at org.apache.jmeter.engine.StandardJMeterEngine.notifyTestListenersOfStart(StandardJMeterEngine.java:205) [ApacheJMeter_core.jar:5.3] at org.apache.jmeter.engine.StandardJMeterEngine.run(StandardJMeterEngine.java:380) [ApacheJMeter_core.jar:5.3] at java.lang.Thread.run(Unknown Source) [?:1.8.0_251] 2020-11-27 16:46:38,794 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*) 2020-11-27 16:46:38,840 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Thread Group 2020-11-27 16:46:38,840 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Thread Group. 2020-11-27 16:46:38,840 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error 2020-11-27 16:46:38,841 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 delayedStart=false 2020-11-27 16:46:38,849 INFO o.a.j.t.ThreadGroup: Started thread group number 1 2020-11-27 16:46:38,849 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started 2020-11-27 16:46:38,851 INFO o.a.j.t.JMeterThread: Thread started: Thread Group 1-1 2020-11-27 16:46:38,861 INFO o.a.j.p.h.s.HTTPHCAbstractImpl: Local host = DESKTOP-EVSJ7TV 2020-11-27 16:46:38,866 INFO o.a.j.p.h.s.HTTPHC4Impl: HTTP request retry count = 0 2020-11-27 16:46:39,070 INFO o.a.j.p.h.s.h.LazyLayeredConnectionSocketFactory: Setting up HTTPS TrustAll Socket Factory 2020-11-27 16:46:41,131 ERROR o.a.j.u.BeanShellInterpreter: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.threads; import org.apache.jmeter.samplers.SampleResult . . . '' : Method Invocation uri_str.group 2020-11-27 16:46:41,131 WARN o.a.j.e.BeanShellPostProcessor: Problem in BeanShell script: org.apache.jorphan.util.JMeterException: Error invoking bsh method: eval Sourced file: inline evaluation of: ``import org.apache.jmeter.threads; import org.apache.jmeter.samplers.SampleResult . . . '' : Method Invocation uri_str.group 2020-11-27 16:46:41,132 INFO o.a.j.t.JMeterThread: Thread is done: Thread Group 1-1 2020-11-27 16:46:41,132 INFO o.a.j.t.JMeterThread: Thread finished: Thread Group 1-1 2020-11-27 16:46:41,134 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test 2020-11-27 16:46:41,134 INFO o.a.j.c.KeystoreConfig: Destroying Keystore 2020-11-27 16:46:41,134 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*) </nabble_embed>