directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r1006164 - in /directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config: ConfigPartitionReader.java ConfigSchemaConstants.java
Date Sat, 09 Oct 2010 13:55:57 GMT
Author: kayyagari
Date: Sat Oct  9 13:55:56 2010
New Revision: 1006164

URL: http://svn.apache.org/viewvc?rev=1006164&view=rev
Log:
o added support for reading the TLS related configuration

Modified:
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
    directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java?rev=1006164&r1=1006163&r2=1006164&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigPartitionReader.java
Sat Oct  9 13:55:56 2010
@@ -98,6 +98,7 @@ import org.apache.directory.server.ldap.
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.ntlm.NtlmMechanismHandler;
 import org.apache.directory.server.ldap.replication.ReplicationProvider;
+import org.apache.directory.server.ldap.replication.ReplicationTrustManager;
 import org.apache.directory.server.ldap.replication.SyncReplProvider;
 import org.apache.directory.server.ldap.replication.SyncreplConfiguration;
 import org.apache.directory.server.ntp.NtpServer;
@@ -1132,6 +1133,23 @@ public class ConfigPartitionReader
                 config.setCookie( replCookieAttr.getBytes() );
             }
             
+            EntryAttribute replUseTls = entry.get( ConfigSchemaConstants.ADS_REPL_USE_TLS
);
+            if( replUseTls != null )
+            {
+                config.setUseTls( Boolean.parseBoolean( replUseTls.getString() ) );
+            }
+            
+            EntryAttribute replPeerCertificate = entry.get( ConfigSchemaConstants.ADS_REPL_PEER_CERTIFICATE
);
+            if( replPeerCertificate != null )
+            {
+                // directly add to the ReplicationTrustManager instead of storing it in the
config
+                ReplicationTrustManager.addCertificate( String.valueOf( config.getReplicaId()
), replPeerCertificate.getBytes() );
+            }
+            else
+            {
+                config.setStrictCertVerification( false );
+            }
+            
             syncReplConfigLst.add( config );
         }
         while( cursor.next() );

Modified: directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java?rev=1006164&r1=1006163&r2=1006164&view=diff
==============================================================================
--- directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
(original)
+++ directory/apacheds/trunk/server-config/src/main/java/org/apache/directory/server/config/ConfigSchemaConstants.java
Sat Oct  9 13:55:56 2010
@@ -210,6 +210,10 @@ public interface ConfigSchemaConstants
     
     String ADS_REPL_ENABLE_PROVIDER = "ads-enableReplProvider";
     
+    String ADS_REPL_PEER_CERTIFICATE = "ads-replPeerCertificate";
+    
+    String ADS_REPL_USE_TLS = "ads-replUseTls";
+    
     String ADS_LDAP_SERVER_SASL_MECH_HANDLER_OC = "ads-ldapServerSaslMechanismHandler";
     
     String ADS_LDAP_SERVER_SASL_MECH_NAME = "ads-ldapServerSaslMechName";



Mime
View raw message