Package net.jsign
Class KeyStoreUtils
- java.lang.Object
-
- net.jsign.KeyStoreUtils
-
public class KeyStoreUtils extends Object
Helper class for loading KeyStores (JKS, JCEKS, PKCS#12 or PKCS#11).- Since:
- 2.0
- Author:
- Emmanuel Bourg
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static KeyStoreload(File keystore, String storetype, String storepass, Provider provider)Load the keystore from the specified file.
-
-
-
Method Detail
-
load
public static KeyStore load(File keystore, String storetype, String storepass, Provider provider) throws KeyStoreException
Load the keystore from the specified file.- Parameters:
keystore- the file containing the keystorestoretype- the type of the keystore (either JKS, JCEKS, PKCS12 or PKCS11). If null the type is inferred from the extension of the file (.p12 or .pfx for PKCS#12 keystores)storepass- The password of the keystoreprovider- The security provider used to load the keystore (must be specified for PKCS#11 keystores)- Returns:
- the keystore loaded
- Throws:
KeyStoreException- thrown if the keystore cannot be loaded
-
-