This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new c846e66e92 Add explanation to UnrecoverableKeyException
c846e66e92 is described below

commit c846e66e92d0ed4428e5a0d7dd9c0bc0570c5def
Author: Patrick Uiterwijk <[email protected]>
AuthorDate: Mon Oct 28 21:33:20 2024 +0100

    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/core/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 81b233e0a3..0c4823ebf6 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 @@ public abstract class SSLManager {
            } 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) {

Reply via email to