Improve keystore exception message when keystore is not valid (#4759)
Signed-off-by: Michael Mayer <michael@schnittstabil.de>
This commit is contained in:
parent
103c22dc43
commit
9079fa63b3
|
@ -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())
|
||||
{
|
||||
|
|
|
@ -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"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue