directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1072014 - /directory/studio/branches/m1/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Date Fri, 18 Feb 2011 15:04:51 GMT
Author: pamarcelot
Date: Fri Feb 18 15:04:50 2011
New Revision: 1072014

URL: http://svn.apache.org/viewvc?rev=1072014&view=rev
Log:
Fixed the disconnect() method of the DirectoryApiConnectionWrapper which was not sending a
unbind request.

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

Modified: directory/studio/branches/m1/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/m1/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java?rev=1072014&r1=1072013&r2=1072014&view=diff
==============================================================================
--- directory/studio/branches/m1/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
(original)
+++ directory/studio/branches/m1/plugins/connection.core/src/main/java/org/apache/directory/studio/connection/core/io/api/DirectoryApiConnectionWrapper.java
Fri Feb 18 15:04:50 2011
@@ -241,6 +241,7 @@ public class DirectoryApiConnectionWrapp
         {
             try
             {
+                ldapConnection.unBind();
                 ldapConnection.close();
             }
             catch ( Exception e )
@@ -320,6 +321,9 @@ public class DirectoryApiConnectionWrapp
                             CramMd5Request cramMd5Request = new CramMd5Request();
                             cramMd5Request.setUsername( bindPrincipal );
                             cramMd5Request.setCredentials( bindPassword );
+                            cramMd5Request.setQualityOfProtection( connection.getConnectionParameter().getSaslQop()
);
+                            cramMd5Request.setSecurityStrength( connection.getConnectionParameter().getSaslSecurityStrength()
);
+                            cramMd5Request.setMutualAuthentication( connection.getConnectionParameter().isSaslMutualAuthentication()
);
 
                             bindResponse = ldapConnection.bind( cramMd5Request );
                         }
@@ -330,6 +334,9 @@ public class DirectoryApiConnectionWrapp
                             digestMd5Request.setUsername( bindPrincipal );
                             digestMd5Request.setCredentials( bindPassword );
                             digestMd5Request.setRealmName( connection.getConnectionParameter().getSaslRealm()
);
+                            digestMd5Request.setQualityOfProtection( connection.getConnectionParameter().getSaslQop()
);
+                            digestMd5Request.setSecurityStrength( connection.getConnectionParameter().getSaslSecurityStrength()
);
+                            digestMd5Request.setMutualAuthentication( connection.getConnectionParameter().isSaslMutualAuthentication()
);
 
                             bindResponse = ldapConnection.bind( digestMd5Request );
                         }
@@ -339,9 +346,21 @@ public class DirectoryApiConnectionWrapp
                             GssApiRequest gssApiRequest = new GssApiRequest();
                             gssApiRequest.setUsername( bindPrincipal );
                             gssApiRequest.setCredentials( bindPassword );
-                            gssApiRequest.setRealmName( connection.getConnectionParameter().getKrb5Realm()
);
-                            gssApiRequest.setKdcHost( connection.getConnectionParameter().getKrb5KdcHost()
);
-                            gssApiRequest.setKdcPort( connection.getConnectionParameter().getKrb5KdcPort()
);
+                            gssApiRequest.setQualityOfProtection( connection.getConnectionParameter().getSaslQop()
);
+                            gssApiRequest.setSecurityStrength( connection.getConnectionParameter().getSaslSecurityStrength()
);
+                            gssApiRequest.setMutualAuthentication( connection.getConnectionParameter().isSaslMutualAuthentication()
);
+                            
+                            switch ( connection.getConnectionParameter().getKrb5Configuration()
)
+                            {
+                                case FILE:
+                                    gssApiRequest.setKrb5ConfFilePath( connection.getConnectionParameter().getKrb5ConfigurationFile()
);
+                                    break;
+                                case MANUAL:
+                                    gssApiRequest.setRealmName( connection.getConnectionParameter().getKrb5Realm()
);
+                                    gssApiRequest.setKdcHost( connection.getConnectionParameter().getKrb5KdcHost()
);
+                                    gssApiRequest.setKdcPort( connection.getConnectionParameter().getKrb5KdcPort()
);
+                                    break;
+                            }
 
                             bindResponse = ldapConnection.bind( gssApiRequest );
                         }



Mime
View raw message