Package org.keycloak.common.util
Class KeystoreUtil
- java.lang.Object
- 
- org.keycloak.common.util.KeystoreUtil
 
- 
 public class KeystoreUtil extends Object - Version:
- $Revision: 1 $
- Author:
- Bill Burke
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classKeystoreUtil.KeystoreFormat
 - 
Constructor SummaryConstructors Constructor Description KeystoreUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetKeystoreType(String preferredType, String path, String defaultType)Try to return supported keystore typestatic KeyPairloadKeyPairFromKeystore(String keystoreFile, String storePassword, String keyPassword, String keyAlias, KeystoreUtil.KeystoreFormat format)static KeyStoreloadKeyStore(String filename, String password)
 
- 
- 
- 
Method Detail- 
loadKeyStorepublic static KeyStore loadKeyStore(String filename, String password) throws Exception - Throws:
- Exception
 
 - 
loadKeyPairFromKeystorepublic static KeyPair loadKeyPairFromKeystore(String keystoreFile, String storePassword, String keyPassword, String keyAlias, KeystoreUtil.KeystoreFormat format) 
 - 
getKeystoreTypepublic static String getKeystoreType(String preferredType, String path, String defaultType) Try to return supported keystore type- Parameters:
- preferredType- The preferred format - usually the one from the configuration. When present, it should be preferred over anything else
- path- Path of the file. We can try to detect keystore type from that (EG. my-keystore.pkcs12 will return "pkcs12") in case that preferredType is not defined
- defaultType- Default format as last fallback when none of the above can be used. Should be non-null
- Returns:
- format as specified above
 
 
- 
 
-