Commit 2627ce25 authored by Guus der Kinderen's avatar Guus der Kinderen

OF-946: Preventing a NPE. Also: Keystore config must have password.

parent 793b046b
......@@ -226,7 +226,7 @@ public enum Purpose
public String getCipherSuitesDisabled()
{
final String propertyName = prefix + "ciphersuites.disabled";
final String defaultValue = null;
final String defaultValue = "";
if ( fallback == null )
{
......
......@@ -532,8 +532,13 @@ public class SSLConfig
{
final SslContextFactory sslContextFactory = new SslContextFactory();
sslContextFactory.setTrustStore( SSLConfig.getTrustStore( purpose ) );
sslContextFactory.setKeyStore( SSLConfig.getIdentityStore( purpose ) );
final TrustStoreConfig trustStoreConfig = SSLConfig.getInstance().getTrustStoreConfig( purpose );
sslContextFactory.setTrustStore( trustStoreConfig.getStore() );
sslContextFactory.setTrustStorePassword( trustStoreConfig.getPassword() );
final IdentityStoreConfig identityStoreConfig = SSLConfig.getInstance().getIdentityStoreConfig( purpose );
sslContextFactory.setKeyStore( identityStoreConfig.getStore() );
sslContextFactory.setKeyStorePassword( identityStoreConfig.getPassword() );
// Configure protocol and cipher suite support.
if ( purpose.getProtocolsEnabled() != null ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment