* Create a testplan with mutual TLS authentication * Load a PKCS12 keystore through the SSL Manager * Start the test and supply the requested password * Load another store thourhg the SSL Manager * No password dialog pops up. Log output says: 020-12-04 09:21:48,307 INFO o.a.j.u.SSLManager: KeyStore created OK 2020-12-04 09:21:48,345 ERROR o.a.j.u.SSLManager: Problem loading keystore: keystore password was incorrect java.io.IOException: keystore password was incorrect at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2078) ~[?:1.8.0_275] at java.security.KeyStore.load(KeyStore.java:1445) ~[?:1.8.0_275] at org.apache.jmeter.util.keystore.JmeterKeyStore.load(JmeterKeyStore.java:108) ~[ApacheJMeter_core.jar:5.3] at org.apache.jmeter.util.SSLManager.getKeyStor... Obviously the password cache is not reset when a new keystore is loaded. I am forced to restart JMeter and load the other keystore.
Created attachment 37587 [details] Ask again for password, when keystore can not be loaded
I have attached a patch to enable re-trying to ask for a password in case the given password could not be used to load keys from the keystore. Would you be able to patch and build a JMeter and report back, if it helps in your case? Otherwise you would have to wait a few days, as we are currently doing a release and we have to prepare the trunk for the next cycle. With this patch, I cleaned up the code a bit, too. I removed an old TODO whether a sync was needed in the password dialog. I decided, it was not needed, as it was called from within a synced region, only. The dialog has gotten a label, as I found it irritating to see a lonely input field with no real explanation (it was given in the title, which I did not read :)) Another enhancement would be to get the focus inside the password dialog.
Thank you, will pick this up on Monday as soon as I get hands on the infrastructure at work.
@MichaelO you can try the next nightly, it should have the patch built in. commit 6701514938f743d864956e4564db13776f7a1f02 Author: Felix Schumacher <felix.schumacher@internetallee.de> AuthorDate: Sun Dec 6 11:29:43 2020 +0100 Keystore password not reset on reload Bugzilla Id: 64955 --- .../java/org/apache/jmeter/util/SSLManager.java | 94 ++++++++++++++-------- xdocs/changes.xml | 1 + 2 files changed, 61 insertions(+), 34 deletions(-)
Awesome, just tried a snapshot from Jenkins. It does work. I did run the testplan with a keystore, switched the stored, supplied a new password and had success. Thank you, looking forward to JMeter 5.4.1.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5442