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:
Greg Wilkins 2018-06-19 09:01:17 +02:00 committed by GitHub
commit 92ba1375be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 3 deletions

View File

@ -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));
}
/**