directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1028783 - /directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Date Fri, 29 Oct 2010 14:50:30 GMT
Author: pamarcelot
Date: Fri Oct 29 14:50:30 2010
New Revision: 1028783

URL: http://svn.apache.org/viewvc?rev=1028783&view=rev
Log:
Added support for StartTLS.

Modified:
    directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java

Modified: directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1028783&r1=1028782&r2=1028783&view=diff
==============================================================================
--- directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/branches/studio-connection-refactoring/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Fri Oct 29 14:50:30 2010
@@ -146,7 +146,8 @@ public class DirectoryApiConnectionWrapp
         config.setLdapPort( connection.getPort() );
         config.setName( connection.getBindPrincipal() );
         config.setCredentials( connection.getBindPassword() );
-        if ( connection.getEncryptionMethod() == EncryptionMethod.LDAPS )
+        if ( ( connection.getEncryptionMethod() == EncryptionMethod.LDAPS )
+            || ( connection.getEncryptionMethod() == EncryptionMethod.START_TLS ) )
         {
             config.setUseSsl( true );
 
@@ -212,6 +213,11 @@ public class DirectoryApiConnectionWrapp
             {
                 try
                 {
+                    if ( connection.getConnectionParameter().getEncryptionMethod() == ConnectionParameter.EncryptionMethod.START_TLS
)
+                    {
+                        getLdapConnection().startTls();
+                    }
+
                     boolean connected = getLdapConnection().connect();
                     if ( !connected )
                     {



Mime
View raw message