directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1587667 - in /directory/apacheds/trunk: installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/ ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ protocol-ldap/src/main/java/org/ap...
Date Tue, 15 Apr 2014 18:17:13 GMT
Author: elecharny
Date: Tue Apr 15 18:17:13 2014
New Revision: 1587667

URL: http://svn.apache.org/r1587667
Log:
Make teh server know about the newly added StartTLS operation

Modified:
    directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper-installation.conf
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
    directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java

Modified: directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper-installation.conf
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper-installation.conf?rev=1587667&r1=1587666&r2=1587667&view=diff
==============================================================================
--- directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper-installation.conf
(original)
+++ directory/apacheds/trunk/installers-maven-plugin/src/main/resources/org/apache/directory/server/installers/wrapper-installation.conf
Tue Apr 15 18:17:13 2014
@@ -36,7 +36,7 @@ wrapper.java.additional.3=-Dapacheds.log
 wrapper.java.additional.4=-Dapacheds.run.dir=${double.quote}%INSTANCE_DIRECTORY%/run${double.quote}
 wrapper.java.additional.5=-Dapacheds.instance=${double.quote}%INSTANCE%${double.quote}
 wrapper.java.additional.6=-Dapacheds.controls=${double.quote}org.apache.directory.api.ldap.codec.controls.cascade.CascadeFactory,org.apache.directory.api.ldap.codec.controls.manageDsaIT.ManageDsaITFactory,org.apache.directory.api.ldap.codec.controls.search.entryChange.EntryChangeFactory,org.apache.directory.api.ldap.codec.controls.search.pagedSearch.PagedResultsFactory,org.apache.directory.api.ldap.codec.controls.search.persistentSearch.PersistentSearchFactory,org.apache.directory.api.ldap.codec.controls.search.subentries.SubentriesFactory,org.apache.directory.api.ldap.extras.controls.ppolicy_impl.PasswordPolicyFactory,org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncDoneValueFactory,org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncInfoValueFactory,org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncRequestValueFactory,org.apache.directory.api.ldap.extras.controls.syncrepl_impl.SyncStateValueFactory${double.quote}
-wrapper.java.additional.8=-Dapacheds.extendedOperations=${double.quote}org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory${double.quote}
+wrapper.java.additional.8=-Dapacheds.extendedOperations=${double.quote}org.apache.directory.api.ldap.extras.extended.ads_impl.cancel.CancelFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.certGeneration.CertGenerationFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulShutdown.GracefulShutdownFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.pwdModify.PasswordModifyFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.gracefulDisconnect.GracefulDisconnectFactory,org.apache.directory.api.ldap.extras.extended.ads_impl.whoAmI.WhoAmIFactory${double.quote},org.apache.directory.api.ldap.extras.extended.ads_impl.startTls.StartTlsFactory${double.quote}
 
 # Initial Java Heap Size (in MB)
 #wrapper.java.initmemory=384

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java?rev=1587667&r1=1587666&r2=1587667&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
(original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/operations/ClientExtendedRequestTest.java
Tue Apr 15 18:17:13 2014
@@ -28,8 +28,8 @@ import java.util.concurrent.TimeUnit;
 
 import javax.naming.ldap.StartTlsRequest;
 
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequestImpl;
 import org.apache.directory.api.ldap.model.message.ExtendedRequest;
-import org.apache.directory.api.ldap.model.message.ExtendedRequestImpl;
 import org.apache.directory.api.ldap.model.message.ExtendedResponse;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.ldap.client.api.LdapNetworkConnection;
@@ -100,7 +100,7 @@ public class ClientExtendedRequestTest e
     {
         try
         {
-            ExtendedRequest extendedRequest = new ExtendedRequestImpl();
+            ExtendedRequest extendedRequest = new StartTlsRequestImpl();
             extendedRequest.setRequestName( StartTlsRequest.OID );
 
             ExtendedFuture extendedFuture = connection.extendedAsync( extendedRequest );

Modified: directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java?rev=1587667&r1=1587666&r2=1587667&view=diff
==============================================================================
--- directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
(original)
+++ directory/apacheds/trunk/protocol-ldap/src/main/java/org/apache/directory/server/ldap/handlers/extended/StartTlsHandler.java
Tue Apr 15 18:17:13 2014
@@ -33,9 +33,10 @@ import javax.net.ssl.TrustManager;
 
 import org.apache.directory.api.ldap.codec.api.ExtendedResponseDecorator;
 import org.apache.directory.api.ldap.codec.api.LdapApiServiceFactory;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsRequest;
+import org.apache.directory.api.ldap.extras.extended.startTls.StartTlsResponseImpl;
 import org.apache.directory.api.ldap.model.message.ExtendedRequest;
 import org.apache.directory.api.ldap.model.message.ExtendedResponse;
-import org.apache.directory.api.ldap.model.message.ExtendedResponseImpl;
 import org.apache.directory.api.ldap.model.message.LdapResult;
 import org.apache.directory.api.ldap.model.message.ResultCodeEnum;
 import org.apache.directory.api.util.Strings;
@@ -58,7 +59,7 @@ import org.slf4j.LoggerFactory;
  */
 public class StartTlsHandler implements ExtendedOperationHandler<ExtendedRequest, ExtendedResponse>
 {
-    public static final String EXTENSION_OID = "1.3.6.1.4.1.1466.20037";
+    public static final String EXTENSION_OID = StartTlsRequest.EXTENSION_OID;
 
     private static final Set<String> EXTENSION_OIDS;
     private static final Logger LOG = LoggerFactory.getLogger( StartTlsHandler.class );
@@ -81,6 +82,7 @@ public class StartTlsHandler implements 
 
         IoFilterChain chain = session.getIoSession().getFilterChain();
         SslFilter sslFilter = ( SslFilter ) chain.get( "sslFilter" );
+        
         if ( sslFilter == null )
         {
             sslFilter = new SslFilter( sslContext );
@@ -98,7 +100,7 @@ public class StartTlsHandler implements 
         }
 
         ExtendedResponseDecorator<ExtendedResponse> res = new ExtendedResponseDecorator<ExtendedResponse>(
-            LdapApiServiceFactory.getSingleton(), new ExtendedResponseImpl( req.getMessageId()
) );
+            LdapApiServiceFactory.getSingleton(), new StartTlsResponseImpl( req.getMessageId()
) );
         LdapResult result = res.getLdapResult();
         result.setResultCode( ResultCodeEnum.SUCCESS );
         res.setResponseName( EXTENSION_OID );



Mime
View raw message