Author: ron.sigal(a)jboss.com
Date: 2012-07-16 22:34:40 -0400 (Mon, 16 Jul 2012)
New Revision: 6441
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
Log:
JBREM-1306: If the new configuration parameter "useDefaultSslSocketFactory" is
true, createSocketFactory() will use HttpsURLConnection default socket factory.
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java
===================================================================
---
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2012-07-17
02:26:49 UTC (rev 6440)
+++
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/http/ssl/HTTPSClientInvoker.java 2012-07-17
02:34:40 UTC (rev 6441)
@@ -54,6 +54,7 @@
*/
public static final String IGNORE_HTTPS_HOST =
"org.jboss.security.ignoreHttpsHost";
public static final String HOSTNAME_VERIFIER = "hostnameVerifier";
+ public static final String USE_DEFAULT_SSL_SOCKET_FACTORY =
"useDefaultSslSocketFactory";
public HTTPSClientInvoker(InvokerLocator locator)
{
@@ -128,6 +129,12 @@
protected SocketFactory createSocketFactory(Map configuration)
{
+ String useDefaultSslSocketFactory = (String)
configuration.get(USE_DEFAULT_SSL_SOCKET_FACTORY);
+ if (useDefaultSslSocketFactory != null &&
Boolean.valueOf(useDefaultSslSocketFactory).booleanValue())
+ {
+ return HttpsURLConnection.getDefaultSSLSocketFactory();
+ }
+
SocketFactory sf = super.createSocketFactory(configuration);
if (isCompleteSocketFactory(sf))