cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1381365 - in /cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient: AsyncHTTPConduit.java CXFConnection.java impl/CXFConnectionFactory.java
Date Wed, 05 Sep 2012 20:51:31 GMT
Author: dkulp
Date: Wed Sep  5 20:51:30 2012
New Revision: 1381365

URL: http://svn.apache.org/viewvc?rev=1381365&view=rev
Log:
Remove some now unused code, rename a method.

Modified:
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFConnection.java
    cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/impl/CXFConnectionFactory.java

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java?rev=1381365&r1=1381364&r2=1381365&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/AsyncHTTPConduit.java
Wed Sep  5 20:51:30 2012
@@ -28,7 +28,6 @@ import java.net.MalformedURLException;
 import java.net.SocketTimeoutException;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.security.GeneralSecurityException;
 import java.security.Principal;
 import java.security.cert.Certificate;
 import java.util.ArrayList;
@@ -38,16 +37,11 @@ import java.util.concurrent.Future;
 
 import javax.net.ssl.HostnameVerifier;
 import javax.net.ssl.HttpsURLConnection;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLContext;
-import javax.net.ssl.SSLEngine;
 import javax.net.ssl.SSLSession;
-import javax.net.ssl.X509KeyManager;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.common.util.SystemPropertyAction;
-import org.apache.cxf.configuration.jsse.SSLUtils;
 import org.apache.cxf.configuration.jsse.TLSClientParameters;
 import org.apache.cxf.helpers.HttpHeaderHelper;
 import org.apache.cxf.io.CacheAndWriteOutputStream;
@@ -56,7 +50,6 @@ import org.apache.cxf.message.MessageUti
 import org.apache.cxf.service.model.EndpointInfo;
 import org.apache.cxf.transport.http.Headers;
 import org.apache.cxf.transport.http.URLConnectionHTTPConduit;
-import org.apache.cxf.transport.https.AliasedX509ExtendedKeyManager;
 import org.apache.cxf.transport.https.CertificateHostnameVerifier;
 import org.apache.cxf.transport.https.HttpsURLConnectionInfo;
 import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
@@ -565,50 +558,8 @@ public class AsyncHTTPConduit extends UR
             }
         }
         
-        public SSLContext getSSLContext() throws GeneralSecurityException {
-            if (tlsClientParameters == null) {
-                tlsClientParameters = new TLSClientParameters();
-            }
-            String provider = tlsClientParameters.getJsseProvider();
-    
-            String protocol = tlsClientParameters.getSecureSocketProtocol() != null ? tlsClientParameters
-                .getSecureSocketProtocol() : "TLS";
-    
-            SSLContext ctx = provider == null ? SSLContext.getInstance(protocol) : SSLContext
-                .getInstance(protocol, provider);
-            ctx.getClientSessionContext().setSessionTimeout(tlsClientParameters.getSslCacheTimeout());
-            KeyManager[] keyManagers = tlsClientParameters.getKeyManagers();
-            if (tlsClientParameters.getCertAlias() != null) {
-                getKeyManagersWithCertAlias(tlsClientParameters, keyManagers);
-            }
-            ctx.init(keyManagers, tlsClientParameters.getTrustManagers(),
-                     tlsClientParameters.getSecureRandom());
-    
-            return ctx;
-        }
-        public void initializeSSLEngine(SSLContext ctx, SSLEngine sslengine) {
-            String[] cipherSuites = SSLUtils.getCiphersuites(tlsClientParameters.getCipherSuites(),
-                                                             SSLUtils.getSupportedCipherSuites(ctx),

-                                                             tlsClientParameters.getCipherSuitesFilter(),
LOG, false);
-            sslengine.setEnabledCipherSuites(cipherSuites);
-        }
-        protected void getKeyManagersWithCertAlias(TLSClientParameters tlsClientParameters,
-                                                   KeyManager[] keyManagers) throws GeneralSecurityException
{
-            if (tlsClientParameters.getCertAlias() != null) {
-                for (int idx = 0; idx < keyManagers.length; idx++) {
-                    if (keyManagers[idx] instanceof X509KeyManager) {
-                        try {
-                            keyManagers[idx] = new AliasedX509ExtendedKeyManager(
-                                tlsClientParameters.getCertAlias(), (X509KeyManager)keyManagers[idx]);
-                        } catch (Exception e) {
-                            throw new GeneralSecurityException(e);
-                        }
-                    }
-                }
-            }
-        }
     
-        public void verify(SSLSession sslsession) {            
+        public void setSSLSession(SSLSession sslsession) {            
             session = sslsession;
             synchronized (sessionLock) {
                 sessionLock.notifyAll();

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFConnection.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFConnection.java?rev=1381365&r1=1381364&r2=1381365&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFConnection.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/CXFConnection.java
Wed Sep  5 20:51:30 2012
@@ -88,7 +88,7 @@ public class CXFConnection extends Defau
             SSLIOSession sslio = (SSLIOSession)iosession;
             iosession.setAttribute(CXFHttpRequest.class.getName(), request);
             if (iosession.getAttribute("cxf.handshake.done") != null) {
-                ((CXFHttpRequest)request).getOutputStream().verify(sslio.getSSLSession());
+                ((CXFHttpRequest)request).getOutputStream().setSSLSession(sslio.getSSLSession());
             }
         }
         if (LOG.isDebugEnabled()) {

Modified: cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/impl/CXFConnectionFactory.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/impl/CXFConnectionFactory.java?rev=1381365&r1=1381364&r2=1381365&view=diff
==============================================================================
--- cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/impl/CXFConnectionFactory.java
(original)
+++ cxf/sandbox/dkulp_async_clients/http-hc/src/main/java/org/apache/cxf/transport/http/asyncclient/impl/CXFConnectionFactory.java
Wed Sep  5 20:51:30 2012
@@ -147,7 +147,7 @@ public class CXFConnectionFactory
                             CXFHttpRequest req = (CXFHttpRequest)iosession
                                 .removeAttribute(CXFHttpRequest.class.getName());
                             if (req != null) {
-                                req.getOutputStream().verify(sslsession);
+                                req.getOutputStream().setSSLSession(sslsession);
                             }
                         }
                     });



Mime
View raw message