directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1143489 - in /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api: LdapConnectionConfig.java LdapNetworkConnection.java
Date Wed, 06 Jul 2011 16:35:43 GMT
Author: pamarcelot
Date: Wed Jul  6 16:35:43 2011
New Revision: 1143489

URL: http://svn.apache.org/viewvc?rev=1143489&view=rev
Log:
Fix for DIRAPI-51 (Add cipher suite support to LdapConnectionConfig) [Initial ID was DIRSHARED-133].

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java?rev=1143489&r1=1143488&r2=1143489&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapConnectionConfig.java
Wed Jul  6 16:35:43 2011
@@ -87,6 +87,9 @@ public class LdapConnectionConfig
     /** an array of certificate trust managers, if set, will be used while initializing the
SSL context */
     private TrustManager[] trustManagers;
 
+    /** an array of cipher suites which are enabled, if set, will be used while initializing
the SSL context */
+    private String[] enabledCipherSuites;
+
     /** name of the protocol used for creating SSL context, default value is "TLS" */
     private String sslProtocol = DEFAULT_SSL_PROTOCOL;
 
@@ -385,4 +388,25 @@ public class LdapConnectionConfig
         this.secureRandom = secureRandom;
     }
 
+
+    /**
+     * Gets the cipher suites which are enabled.
+     * 
+     * @return the cipher suites which are enabled
+     */
+    public String[] getEnabledCipherSuites()
+    {
+        return enabledCipherSuites;
+    }
+
+
+    /**
+     * Sets the cipher suites which are enabled
+     * 
+     * @param enabledCipherSuites the cipher suites which are enabled
+     */
+    public void setEnabledCipherSuites( String[] enabledCipherSuites )
+    {
+        this.enabledCipherSuites = enabledCipherSuites;
+    }
 }

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1143489&r1=1143488&r2=1143489&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Wed Jul  6 16:35:43 2011
@@ -3768,6 +3768,7 @@ public class LdapNetworkConnection exten
 
             SslFilter sslFilter = new SslFilter( sslContext );
             sslFilter.setUseClientMode( true );
+            sslFilter.setEnabledCipherSuites( config.getEnabledCipherSuites() );
 
             // for LDAPS
             if ( ldapSession == null )



Mime
View raw message