Author: anil.saldhana(a)jboss.com
Date: 2011-06-06 18:08:32 -0400 (Mon, 06 Jun 2011)
New Revision: 972
Modified:
trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/PicketLinkDispatch.java
Log:
set default ssl sock fact
Modified:
trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/PicketLinkDispatch.java
===================================================================
---
trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/PicketLinkDispatch.java 2011-06-03
19:51:21 UTC (rev 971)
+++
trust/trunk/jbossws/src/main/java/org/picketlink/trust/jbossws/PicketLinkDispatch.java 2011-06-06
22:08:32 UTC (rev 972)
@@ -30,6 +30,8 @@
import java.util.Set;
import java.util.concurrent.Future;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.SSLSocketFactory;
import javax.security.jacc.PolicyContext;
import javax.security.jacc.PolicyContextException;
import javax.servlet.http.HttpServletRequest;
@@ -84,6 +86,7 @@
private String endpoint;
private boolean useWSSE = false;
+ private SSLSocketFactory sslSocketFactory;
@SuppressWarnings("rawtypes")
public PicketLinkDispatch(Dispatch parent, String endpoint)
@@ -97,6 +100,11 @@
this.useWSSE = val;
}
+ public void setSSLSocketFactory( SSLSocketFactory ssl)
+ {
+ this.sslSocketFactory = ssl;
+ }
+
public Map<String, Object> getRequestContext()
{
return parent.getRequestContext();
@@ -208,6 +216,11 @@
throw new WebServiceException("Handler "+ handler.getClass() +
" returned false");
}
+ if(sslSocketFactory != null)
+ {
+ HttpsURLConnection.setDefaultSSLSocketFactory(sslSocketFactory);
+ }
+
SOAPBody body;
try
{
Show replies by date