diff --git a/jetty-util/src/main/java/org/eclipse/jetty/util/security/CertificateUtils.java b/jetty-util/src/main/java/org/eclipse/jetty/util/security/CertificateUtils.java index e5261cc3787..7a91878c80d 100644 --- a/jetty-util/src/main/java/org/eclipse/jetty/util/security/CertificateUtils.java +++ b/jetty-util/src/main/java/org/eclipse/jetty/util/security/CertificateUtils.java @@ -47,7 +47,7 @@ public class CertificateUtils } if (!store.exists()) - throw new IllegalStateException("no valid keystore"); + throw new IllegalStateException(store.getName() + " is not a valid keystore"); try (InputStream inStream = store.getInputStream()) { diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java index d676dcbb77e..edce0f218be 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/ssl/SslContextFactoryTest.java @@ -244,7 +244,7 @@ public class SslContextFactoryTest cf.setTrustStorePath("/foo"); cf.start(); }); - assertThat(x.getMessage(), containsString("no valid keystore")); + assertThat(x.getMessage(), equalTo("/foo is not a valid keystore")); } }