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 49b55ec99da6..d39d00ff2f61 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 static KeyStore getKeyStore(Resource store, String storeType, String stor } 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 15d8228f427d..f6270c1eace8 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 @@ -217,7 +217,7 @@ public void testNoKeyConfig() cf.setTrustStorePath("/foo"); cf.start(); }); - assertThat(x.getMessage(), containsString("no valid keystore")); + assertThat(x.getMessage(), equalTo("/foo is not a valid keystore")); } }