Skip to content

Commit

Permalink
OF-2559 Remove HTML tags in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
viv committed Jul 25, 2023
1 parent 2066e82 commit 987eb52
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 62 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.<p>
* 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
Expand All @@ -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.<p>
* 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. <p>
* they were added.
*
* Adding a filter does not initialize the plugin instance.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,61 +398,6 @@ public SslContext createClientModeSslContext() throws SSLException, Unrecoverabl
.build();
}

/**
* Create and configure a new SslContext instance for a Netty server.<p>
*
* @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.<p>
*
* 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<String> 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.
*
Expand Down

0 comments on commit 987eb52

Please sign in to comment.