diff --git a/xmppserver/src/main/java/org/jivesoftware/admin/PluginFilter.java b/xmppserver/src/main/java/org/jivesoftware/admin/PluginFilter.java index 924bb4ff9c..d3168b8186 100644 --- a/xmppserver/src/main/java/org/jivesoftware/admin/PluginFilter.java +++ b/xmppserver/src/main/java/org/jivesoftware/admin/PluginFilter.java @@ -29,7 +29,7 @@ import java.util.concurrent.ConcurrentHashMap; /** - * A servlet filter that plugin classes can use to dynamically register and un-register filter logic.

+ * A servlet filter that plugin classes can use to dynamically register and un-register filter logic. * * This implementation assumes, but does not enforce, that filters installed by plugins are applied to URL patterns that * match the plugin. When filters installed by different plugins are applied to the same URL, the behavior of this @@ -47,10 +47,10 @@ public class PluginFilter implements Filter { /** * Adds a filter to the list of filters that will be run on every request of which the URL matches the URL that * is registered with this filter. More specifically, the request URL should be equal to, or start with, the filter - * URL.

+ * URL. * * Multiple filters can be registered on the same URL, in which case they will be executed in the order in which - * they were added.

+ * they were added. * * Adding a filter does not initialize the plugin instance. * diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/net/RespondingServerStanzaHandler.java b/xmppserver/src/main/java/org/jivesoftware/openfire/net/RespondingServerStanzaHandler.java index 23e7b52e84..b8acc171c4 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/net/RespondingServerStanzaHandler.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/net/RespondingServerStanzaHandler.java @@ -24,10 +24,7 @@ import org.jivesoftware.openfire.Connection; import org.jivesoftware.openfire.PacketRouter; import org.jivesoftware.openfire.server.ServerDialback; -import org.jivesoftware.openfire.session.DomainPair; -import org.jivesoftware.openfire.session.LocalOutgoingServerSession; -import org.jivesoftware.openfire.session.LocalSession; -import org.jivesoftware.openfire.session.ServerSession; +import org.jivesoftware.openfire.session.*; import org.jivesoftware.openfire.spi.BasicStreamIDFactory; import org.jivesoftware.util.JiveGlobals; import org.jivesoftware.util.StringUtils; diff --git a/xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java b/xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java index 665c7a029d..dc585cb2a7 100644 --- a/xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java +++ b/xmppserver/src/main/java/org/jivesoftware/openfire/spi/EncryptionArtifactFactory.java @@ -398,61 +398,6 @@ public SslContext createClientModeSslContext() throws SSLException, Unrecoverabl .build(); } - /** - * Create and configure a new SslContext instance for a Netty server.

- * - * @param directTLS if the first write request should be encrypted. - * @return A secure socket protocol implementation which acts as a factory for {@link SSLContext} and {@link io.netty.handler.ssl.SslHandler} - */ - public SslContext createServerModeSslContext(boolean directTLS) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, SSLException { - getKeyManagers(); - SslContextBuilder builder = SslContextBuilder.forServer(keyManagerFactory); - - // Set policy for checking client certificates. - switch ( configuration.getClientAuth() ) - { - case disabled: - builder.clientAuth(ClientAuth.NONE); - break; - case wanted: - builder.clientAuth(ClientAuth.OPTIONAL); - break; - case needed: - builder.clientAuth(ClientAuth.REQUIRE); - break; - } - - builder.protocols(configuration.getEncryptionProtocols()); - builder.ciphers(configuration.getEncryptionCipherSuites()); - builder.startTls(!directTLS); - - return builder.build(); - } - - /** - * Create and configure a new SslContext instance for a Netty client.

- * - * Used when the Openfire server is acting as a client when making S2S connections. - * - * @return A secure socket protocol implementation which acts as a factory for {@link SSLContext} and {@link io.netty.handler.ssl.SslHandler} - */ - public SslContext createClientModeSslContext() throws SSLException, UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException { - getKeyManagers(); - - // We will never send SSLV2 ClientHello messages - Set protocols = new HashSet<>(configuration.getEncryptionProtocols()); - protocols.remove("SSLv2Hello"); - - return SslContextBuilder - .forClient() - .protocols(protocols) - .ciphers(configuration.getEncryptionCipherSuites()) - .keyManager(keyManagerFactory) - .trustManager(getTrustManagers()[0]) - .startTls(false) - .build(); - } - /** * Creates an Apache MINA SslFilter that is configured to use server mode when handshaking. *