From 3bd4bdb079626be72060410c6b0d02b39e32eb9b Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 25 Apr 2017 14:38:23 -0500 Subject: [PATCH] ARTEMIS-1130 log disallowed SSL protocols once --- .../artemis/core/remoting/impl/netty/NettyAcceptor.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java index a428f040ee..0f714c269f 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java @@ -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 configuration, @@ -473,12 +476,16 @@ public class NettyAcceptor extends AbstractAcceptor { Set set = new HashSet<>(); for (String s : protocols) { if (s.equalsIgnoreCase("SSLv3") || s.equals("SSLv2Hello")) { - ActiveMQServerLogger.LOGGER.disallowedProtocol(s, name); + 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) {