mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Fabio Pistolesi
20.29.2016 d8ecac31301960d58a6dc856939a97d709e82773
opendj-server-legacy/src/main/java/org/opends/server/replication/server/ReplicationServer.java
@@ -53,6 +53,7 @@
import org.opends.server.api.VirtualAttributeProvider;
import org.opends.server.backends.ChangelogBackend;
import org.opends.server.core.DirectoryServer;
import org.opends.server.crypto.CryptoSuite;
import org.opends.server.replication.common.CSN;
import org.opends.server.replication.common.MultiDomainServerState;
import org.opends.server.replication.common.ServerState;
@@ -129,6 +130,8 @@
   */
  private static final List<ReplicationServer> allInstances = new ArrayList<>();
  private final CryptoSuite cryptoSuite;
  /**
   * Creates a new Replication server using the provided configuration entry.
   *
@@ -170,7 +173,10 @@
    this.domainPredicate = predicate;
    enableExternalChangeLog();
    this.changelogDB = new FileChangelogDB(this, config.getReplicationDBDirectory());
    cryptoSuite = DirectoryServer.getInstance().getServerContext().getCryptoManager().
        newCryptoSuite(cfg.getCipherTransformation(), cfg.getCipherKeyLength(), cfg.isConfidentialityEnabled());
    this.changelogDB = new FileChangelogDB(this, config.getReplicationDBDirectory(), cryptoSuite);
    replSessionSecurity = new ReplSessionSecurity();
    initialize();
@@ -871,6 +877,9 @@
      }
    }
    cryptoSuite.newParameters(config.getCipherTransformation(), config.getCipherKeyLength(),
        config.isConfidentialityEnabled());
    // changing the listen port requires to stop the listen thread
    // and restart it.
    if (getReplicationPort() != oldConfig.getReplicationPort())
@@ -1337,6 +1346,15 @@
    return MultimasterReplication.isECLEnabled();
  }
  /**
   * Return whether change-log records should be encrypted.
   * @return trus if change-log records should be encrypted
   */
  public boolean isEncrypted()
  {
    return config.isConfidentialityEnabled();
  }
  @Override
  public String toString()
  {