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

Yannick Lecaillez
05.17.2015 3ba4a8a412fa60c947ecb3cee9d90fb24e590d54
opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java
@@ -30,6 +30,8 @@
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.KeyPairGenerator;
import java.security.KeyStore;
import java.security.PrivateKey;
import java.security.cert.Certificate;
@@ -118,6 +120,22 @@
    }
    /**
     * Check whether or not, this key type is supported by the current JVM.
     * @return true if this key type is supported, false otherwise.
     */
    public boolean isSupported()
    {
      try
      {
        return KeyPairGenerator.getInstance(keyAlgorithm.toUpperCase()) != null;
      }
      catch (NoSuchAlgorithmException e)
      {
        return false;
      }
    }
    /**
     * Get a KeyType based on the alias name.
     *
     * @param alias