public class KeyStore extends Object
Constructor and Description |
---|
KeyStore() |
Modifier and Type | Method and Description |
---|---|
static void |
addWebExtraCertificate(String cert)
Add extra certificate which works the same way as certificates in WebPublicKeyStore
|
static PrivateKeyStore |
getSelectedPrivateKeyStore() |
static void |
initWebPublicKeystoreLocation(Class classToResource,
String pathToResource)
Initialized WebPublicKeyStore with the user-specified keystore file from resource
|
static void |
removeWebExtraCertificates()
Remove all extra certificates
|
static PrivateKeyStore |
selectPrivateKeyStore(String privateKeyStoreType)
Select a private key store to use
|
public static void initWebPublicKeystoreLocation(Class classToResource, String pathToResource)
classToResource
- the class of the loading resource filepathToResource
- path of the resource file of keystoreNullPointerException
- classToResource
or pathToResource
is null.public static void addWebExtraCertificate(String cert) throws IOException
cert
- base64-encoded certificate stringIOException
- if parse certificate string failspublic static void removeWebExtraCertificates()
cert
- base64-encoded certificate stringIOException
- if parse certificate string failspublic static PrivateKeyStore selectPrivateKeyStore(String privateKeyStoreType)
privateKeyStoreType
- Private key store provider, null means that default key store type is used.public static PrivateKeyStore getSelectedPrivateKeyStore()