diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientConnFactory.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientConnFactory.java index 61ebc3ceff..1f27e997f2 100644 --- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientConnFactory.java +++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/http/conn/ClientConnFactory.java @@ -40,6 +40,8 @@ import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import javax.net.ssl.SSLContext; @@ -49,6 +51,7 @@ * particular server from the specified map it uses the default SSLContext. */ public class ClientConnFactory { + protected Log log = LogFactory.getLog(ClientConnFactory.class);; private final HttpResponseFactory responseFactory; private final ByteBufferAllocator allocator; @@ -113,6 +116,9 @@ private SSLContext getSSLContextForHost(String host) { if (customContext != null) { return customContext; } else { + if (log.isDebugEnabled()) { + log.debug("The sslByHostMap is null or Custom SSL context is null for the host : " + host); + } return ssl != null ? ssl.getContext() : null; } } diff --git a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/config/ClientConnFactoryBuilder.java b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/config/ClientConnFactoryBuilder.java index f076479c7d..a3564baaa1 100644 --- a/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/config/ClientConnFactoryBuilder.java +++ b/modules/transports/core/nhttp/src/main/java/org/apache/synapse/transport/nhttp/config/ClientConnFactoryBuilder.java @@ -60,6 +60,7 @@ import java.util.List; import java.util.Locale; import java.util.Map; +import java.util.Arrays; public class ClientConnFactoryBuilder { @@ -251,6 +252,9 @@ private Map getCustomSSLContexts(TransportOutDescription tra } String[] servers = serversElt.getText().split(","); + if (log.isDebugEnabled()) { + log.debug("Servers list of the custom SSL profile : " + Arrays.toString(servers)); + } OMElement ksElt = profile.getFirstChildWithName(new QName("KeyStore")); OMElement trElt = profile.getFirstChildWithName(new QName("TrustStore")); String noValCert = profile.getAttributeValue(new QName("novalidatecert")); @@ -268,6 +272,9 @@ private Map getCustomSSLContexts(TransportOutDescription tra server = server.trim(); if (!contextMap.containsKey(server)) { contextMap.put(server, sslContext); + if (log.isDebugEnabled()) { + log.debug("Update the SSL context map for the server: " + server); + } } else { if (log.isWarnEnabled()) { log.warn(name + " Multiple SSL profiles were found for the server : " +