From c846e66e92d0ed4428e5a0d7dd9c0bc0570c5def Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Mon, 28 Oct 2024 21:33:20 +0100 Subject: [PATCH] Add explanation to UnrecoverableKeyException Unrecoverable keys after opening the keystore could be a consequence of the key having a different password than the keystore itself. This could cause some people to spend a lot of time figuring out what's going on, so let's just give them a quick heads up of a potential (common?) reason for this error. This could be fixed by running "keytool -keypasswd". --- .../src/main/java/org/apache/jmeter/util/SSLManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/src/main/java/org/apache/jmeter/util/SSLManager.java b/src/core/src/main/java/org/apache/jmeter/util/SSLManager.java index 81b233e0a3c..0c4823ebf68 100644 --- a/src/core/src/main/java/org/apache/jmeter/util/SSLManager.java +++ b/src/core/src/main/java/org/apache/jmeter/util/SSLManager.java @@ -157,7 +157,10 @@ protected synchronized JmeterKeyStore getKeyStore() { } catch (IOException e) { log.error("Can't load keystore '{}'. Wrong password?", fileName, e); } catch (UnrecoverableKeyException e) { - log.error("Can't recover keys from keystore '{}'", fileName, e); + log.error( + "Can't recover keys from keystore '{}'. Is key password different from keystore password?", + fileName, + e); } catch (NoSuchAlgorithmException e) { log.error("Problem finding the correct algorithm while loading keys from keystore '{}'", fileName, e); } catch (CertificateException e) {