Improve keystore exception message when keystore is not valid (#4759)
Signed-off-by: Michael Mayer <michael@schnittstabil.de>
This commit is contained in:
parent
3981ec1342
commit
a640701d78
|
@ -47,7 +47,7 @@ public class CertificateUtils
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!store.exists())
|
if (!store.exists())
|
||||||
throw new IllegalStateException("no valid keystore");
|
throw new IllegalStateException(store.getName() + " is not a valid keystore");
|
||||||
|
|
||||||
try (InputStream inStream = store.getInputStream())
|
try (InputStream inStream = store.getInputStream())
|
||||||
{
|
{
|
||||||
|
|
|
@ -217,7 +217,7 @@ public class SslContextFactoryTest
|
||||||
cf.setTrustStorePath("/foo");
|
cf.setTrustStorePath("/foo");
|
||||||
cf.start();
|
cf.start();
|
||||||
});
|
});
|
||||||
assertThat(x.getMessage(), containsString("no valid keystore"));
|
assertThat(x.getMessage(), equalTo("/foo is not a valid keystore"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue