Skip to content

Commit

Permalink
post mina custom ssl filter removal
Browse files Browse the repository at this point in the history
  • Loading branch information
the-thing committed Jan 1, 2025
1 parent 14a28b4 commit 0f9e964
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 43 deletions.
35 changes: 0 additions & 35 deletions quickfixj-core/src/main/java/quickfix/mina/CustomSslFilter.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import quickfix.SessionID;
import quickfix.SessionSettings;
import quickfix.mina.CompositeIoFilterChainBuilder;
import quickfix.mina.CustomSslFilter;
import quickfix.mina.EventHandlingStrategy;
import quickfix.mina.NetworkingOptions;
import quickfix.mina.ProtocolFactory;
Expand Down Expand Up @@ -135,7 +134,7 @@ private void installSSL(AcceptorSocketDescriptor descriptor,
log.info("Installing SSL filter for {}", descriptor.getAddress());
SSLConfig sslConfig = descriptor.getSslConfig();
SSLContext sslContext = SSLContextFactory.getInstance(sslConfig);
SslFilter sslFilter = new CustomSslFilter(sslContext);
SslFilter sslFilter = new SslFilter(sslContext);
sslFilter.setNeedClientAuth(sslConfig.isNeedClientAuth());
sslFilter.setEnabledCipherSuites(sslConfig.getEnabledCipherSuites() != null ? sslConfig.getEnabledCipherSuites()
: SSLSupport.getDefaultCipherSuites(sslContext));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import quickfix.SessionSettings;
import quickfix.SystemTime;
import quickfix.mina.CompositeIoFilterChainBuilder;
import quickfix.mina.CustomSslFilter;
import quickfix.mina.EventHandlingStrategy;
import quickfix.mina.NetworkingOptions;
import quickfix.mina.ProtocolFactory;
Expand Down Expand Up @@ -159,9 +158,8 @@ private void setupIoConnector() throws ConfigError, GeneralSecurityException {

boolean hasProxy = proxyType != null && proxyPort > 0 && socketAddresses[nextSocketAddressIndex] instanceof InetSocketAddress;

SslFilter sslFilter = null;
if (sslEnabled) {
sslFilter = installSslFilter(ioFilterChainBuilder);
installSslFilter(ioFilterChainBuilder);
}

ioFilterChainBuilder.addLast(FIXProtocolCodecFactory.FILTER_NAME, new ProtocolCodecFilter(new FIXProtocolCodecFactory()));
Expand Down Expand Up @@ -192,17 +190,16 @@ private void setupIoConnector() throws ConfigError, GeneralSecurityException {
ioConnector = newConnector;
}

private SslFilter installSslFilter(CompositeIoFilterChainBuilder ioFilterChainBuilder)
private void installSslFilter(CompositeIoFilterChainBuilder ioFilterChainBuilder)
throws GeneralSecurityException {
final SSLContext sslContext = SSLContextFactory.getInstance(sslConfig);
final SslFilter sslFilter = new CustomSslFilter(sslContext, false);
final SslFilter sslFilter = new SslFilter(sslContext, false);
sslFilter.setEnabledCipherSuites(sslConfig.getEnabledCipherSuites() != null ? sslConfig.getEnabledCipherSuites()
: SSLSupport.getDefaultCipherSuites(sslContext));
sslFilter.setEnabledProtocols(sslConfig.getEnabledProtocols() != null ? sslConfig.getEnabledProtocols()
: SSLSupport.getSupportedProtocols(sslContext));
sslFilter.setEndpointIdentificationAlgorithm(sslConfig.getEndpointIdentificationAlgorithm());
ioFilterChainBuilder.addLast(SSLSupport.FILTER_NAME, sslFilter);
return sslFilter;
}

@Override
Expand Down

0 comments on commit 0f9e964

Please sign in to comment.