| | |
| | | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 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 |