Merge pull request #2641 from eclipse/jetty-9.4.x-901-load_truststore
Issue #901 - Overriding SSL context KeyStoreType requires explicit override of TrustStoreType.
This commit is contained in:
commit
92ba1375be
|
@ -1082,10 +1082,14 @@ public class SslContextFactory extends AbstractLifeCycle implements Dumpable
|
|||
{
|
||||
String type = Objects.toString(getTrustStoreType(), getKeyStoreType());
|
||||
String provider = Objects.toString(getTrustStoreProvider(), getKeyStoreProvider());
|
||||
String passwd = Objects.toString(_trustStorePassword, Objects.toString(_keyStorePassword, null));
|
||||
if (resource == null)
|
||||
Password passwd = _trustStorePassword;
|
||||
if (resource == null || resource.equals(_keyStoreResource))
|
||||
{
|
||||
resource = _keyStoreResource;
|
||||
return CertificateUtils.getKeyStore(resource, type, provider, passwd);
|
||||
if (passwd == null)
|
||||
passwd = _keyStorePassword;
|
||||
}
|
||||
return CertificateUtils.getKeyStore(resource, type, provider, Objects.toString(passwd, null));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue