ARTEMIS-1130 log disallowed SSL protocols once

This commit is contained in:
Justin Bertram 2017-04-25 14:38:23 -05:00 committed by Martyn Taylor
parent c40f856de0
commit 3bd4bdb079
1 changed files with 8 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.Channel;
@ -193,6 +194,8 @@ public class NettyAcceptor extends AbstractAcceptor {
private static final Logger logger = Logger.getLogger(NettyAcceptor.class);
final AtomicBoolean warningPrinted = new AtomicBoolean(false);
public NettyAcceptor(final String name,
final ClusterConnection clusterConnection,
final Map<String, Object> configuration,
@ -473,12 +476,16 @@ public class NettyAcceptor extends AbstractAcceptor {
Set<String> set = new HashSet<>();
for (String s : protocols) {
if (s.equalsIgnoreCase("SSLv3") || s.equals("SSLv2Hello")) {
if (!warningPrinted.get()) {
ActiveMQServerLogger.LOGGER.disallowedProtocol(s, name);
}
continue;
}
set.add(s);
}
warningPrinted.set(true);
engine.setEnabledProtocols(set.toArray(new String[set.size()]));
if (verifyHost) {