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

Yannick Lecaillez
16.41.2015 3cde706b9c2ad1b6a32c5b0d55e4f0add35d315d
Add component name for missing key type log message.
3 files modified
18 ■■■■■ changed files
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerImpl.java 7 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ReplSessionSecurity.java 8 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/types/CryptoManager.java 3 ●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/crypto/CryptoManagerImpl.java
@@ -2840,8 +2840,7 @@
  /** {@inheritDoc} */
  @Override
  public SSLContext getSslContext(SortedSet<String> sslCertNicknames)
       throws ConfigException
  public SSLContext getSslContext(String componentName, SortedSet<String> sslCertNicknames) throws ConfigException
  {
    SSLContext sslContext;
    try
@@ -2860,9 +2859,7 @@
      else
      {
        KeyManager[] extendedKeyManagers =
             SelectableCertificateKeyManager.wrap(
                  keyManagers,
                  sslCertNicknames);
            SelectableCertificateKeyManager.wrap(keyManagers, sslCertNicknames, componentName);
        sslContext.init(extendedKeyManagers, trustManagers, null);
      }
    }
opendj-server-legacy/src/main/java/org/opends/server/replication/protocol/ReplSessionSecurity.java
@@ -52,6 +52,10 @@
public final class ReplSessionSecurity
{
  private static final String REPLICATION_SERVER_NAME = "Replication Server";
  private static final String REPLICATION_CLIENT_NAME = "Replication Client";
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
  /**
@@ -169,7 +173,7 @@
      // Create a new SSL context every time to make sure we pick up the
      // latest contents of the trust store.
      final CryptoManager cryptoManager = DirectoryConfig.getCryptoManager();
      final SSLContext sslContext = cryptoManager.getSslContext(sslCertNicknames);
      final SSLContext sslContext = cryptoManager.getSslContext(REPLICATION_CLIENT_NAME, sslCertNicknames);
      final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
      secureSocket = (SSLSocket) sslSocketFactory.createSocket(
@@ -231,7 +235,7 @@
      // Create a new SSL context every time to make sure we pick up the
      // latest contents of the trust store.
      final CryptoManager cryptoManager = DirectoryConfig.getCryptoManager();
      final SSLContext sslContext = cryptoManager.getSslContext(sslCertNicknames);
      final SSLContext sslContext = cryptoManager.getSslContext(REPLICATION_SERVER_NAME, sslCertNicknames);
      final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();
      secureSocket = (SSLSocket) sslSocketFactory.createSocket(
opendj-server-legacy/src/main/java/org/opends/server/types/CryptoManager.java
@@ -400,13 +400,14 @@
   * Create an SSL context that may be used for communication to
   * another ADS component.
   *
   * @param componentName    Name of the component to which is associated this SSL Context.
   * @param sslCertNicknames The names of the local certificates to use,
   *                         or null if none is specified.
   * @return A new SSL Context.
   * @throws ConfigException If the context
   * could not be created.
   */
  SSLContext getSslContext(SortedSet<String> sslCertNicknames) throws ConfigException;
  SSLContext getSslContext(String componentName, SortedSet<String> sslCertNicknames) throws ConfigException;
  /**
   * Get the names of the local certificates to use for SSL.