directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1587666 - in /directory/shared/trunk/ldap/client/api: pom.xml src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Date Tue, 15 Apr 2014 18:16:21 GMT
Author: elecharny
Date: Tue Apr 15 18:16:20 2014
New Revision: 1587666

URL: http://svn.apache.org/r1587666
Log:
Updated the client API to allow the use of the StartTLS operation

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

Modified: directory/shared/trunk/ldap/client/api/pom.xml
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/pom.xml?rev=1587666&r1=1587665&r2=1587666&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/pom.xml (original)
+++ directory/shared/trunk/ldap/client/api/pom.xml Tue Apr 15 18:16:20 2014
@@ -59,6 +59,16 @@
     </dependency>
 
     <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>api-ldap-extras-codec</artifactId>
+    </dependency>
+
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>api-ldap-extras-codec-api</artifactId>
+    </dependency>
+
+    <dependency>
       <groupId>commons-pool</groupId>
       <artifactId>commons-pool</artifactId>
       <version>${commons.pool.version}</version>

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=1587666&r1=1587665&r2=1587666&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
Tue Apr 15 18:16:20 2014
@@ -60,6 +60,7 @@ import org.apache.directory.api.ldap.cod
 import org.apache.directory.api.ldap.codec.api.MessageDecorator;
 import org.apache.directory.api.ldap.codec.api.MessageEncoderException;
 import org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
 import org.apache.directory.api.ldap.model.cursor.Cursor;
 import org.apache.directory.api.ldap.model.cursor.CursorException;
@@ -163,7 +164,6 @@ import org.apache.mina.transport.socket.
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-
 /**
  * This class is the base for every operations sent or received to and
  * from a LDAP server.
@@ -226,9 +226,6 @@ public class LdapNetworkConnection exten
     /** The exception stored in the session if we've got one */
     private static final String EXCEPTION_KEY = "sessionException";
 
-    /** the StartTLS extended operation's OID */
-    private static final String START_TLS_REQ_OID = "1.3.6.1.4.1.1466.20037";
-
     // ~~~~~~~~~~~~~~~~~ common error messages ~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     static final String TIME_OUT_ERROR = "TimeOut occurred";
@@ -3715,7 +3712,7 @@ public class LdapNetworkConnection exten
                 return;
             }
 
-            ExtendedResponse resp = extended( START_TLS_REQ_OID );
+            ExtendedResponse resp = extended( new StartTlsRequestImpl() );
             LdapResult result = resp.getLdapResult();
 
             if ( result.getResultCode() == ResultCodeEnum.SUCCESS )



Mime
View raw message