X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=eclipse%2Forg.argeo.ext.equinox.jetty%2Fsrc%2Forg%2Fargeo%2Fequinox%2Fjetty%2FCmsJettyCustomizer.java;fp=eclipse%2Forg.argeo.ext.equinox.jetty%2Fsrc%2Forg%2Fargeo%2Fequinox%2Fjetty%2FCmsJettyCustomizer.java;h=ab291b5456ee2f5a5230c81137462bfe474e760d;hb=36c0ba6709ae9a3974c1d1dce01ebe47c5aec24e;hp=e34049506b553ee3bd6948dab80de0092dc20c7f;hpb=8302ed5e76967f1d618b59ebe4ae11223e5037c3;p=lgpl%2Fargeo-commons.git diff --git a/eclipse/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java b/eclipse/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java index e34049506..ab291b545 100644 --- a/eclipse/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java +++ b/eclipse/org.argeo.ext.equinox.jetty/src/org/argeo/equinox/jetty/CmsJettyCustomizer.java @@ -49,15 +49,16 @@ public class CmsJettyCustomizer extends JettyCustomizer { @Override public Object customizeHttpsConnector(Object connector, Dictionary settings) { ServerConnector httpsConnector = (ServerConnector) connector; - for (ConnectionFactory connectionFactory : httpsConnector.getConnectionFactories()) { - if (connectionFactory instanceof SslConnectionFactory) { - SslContextFactory.Server sslConnectionFactory = ((SslConnectionFactory) connectionFactory) - .getSslContextFactory(); - sslConnectionFactory.setTrustStorePath((String) settings.get(SSL_TRUSTSTORE)); - sslConnectionFactory.setTrustStoreType((String) settings.get(SSL_TRUSTSTORETYPE)); - sslConnectionFactory.setTrustStorePassword((String) settings.get(SSL_TRUSTSTOREPASSWORD)); + if (httpsConnector != null) + for (ConnectionFactory connectionFactory : httpsConnector.getConnectionFactories()) { + if (connectionFactory instanceof SslConnectionFactory) { + SslContextFactory.Server sslConnectionFactory = ((SslConnectionFactory) connectionFactory) + .getSslContextFactory(); + sslConnectionFactory.setTrustStorePath((String) settings.get(SSL_TRUSTSTORE)); + sslConnectionFactory.setTrustStoreType((String) settings.get(SSL_TRUSTSTORETYPE)); + sslConnectionFactory.setTrustStorePassword((String) settings.get(SSL_TRUSTSTOREPASSWORD)); + } } - } return super.customizeHttpsConnector(connector, settings); }