From 3ba4a8a412fa60c947ecb3cee9d90fb24e590d54 Mon Sep 17 00:00:00 2001
From: Yannick Lecaillez <ylecaillez@forgerock.com>
Date: Wed, 18 Nov 2015 15:24:16 +0000
Subject: [PATCH] OPENDJ-2399: Start server fails if the jvm used does not contains an elliptic curve certificate provider.
---
opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java b/opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java
index ee94311..3d07de1 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/util/Platform.java
+++ b/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
--
Gitblit v1.10.0