Package org.certificateservices.messages
Interface PKCS11ProviderManager
-
- All Known Implementing Classes:
DefaultPKCS11ProviderManager
public interface PKCS11ProviderManagerInterface to support a PKCS#11 provider manager in charge of creating, adding and loading a java PKCS#11 keystore.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringaddPKCS11Provider(java.io.InputStream config)Create and add a PKCS#11 provider to the systemjava.security.KeyStoreloadPKCS11Keystore(char[] password)Load the PKCS#11 keystore and make it available for use.
-
-
-
Method Detail
-
addPKCS11Provider
java.lang.String addPKCS11Provider(java.io.InputStream config) throws java.lang.SecurityException, java.lang.NullPointerException, java.security.ProviderExceptionCreate and add a PKCS#11 provider to the system- Parameters:
config- Configuration to use when creating the provider- Returns:
- the name of the created provider.
- Throws:
java.lang.NullPointerException- If an empty provider was created based on the configuration.java.lang.SecurityException- If a security manager exists and its SecurityManager.checkSecurityAccess method denies access to add a new providerjava.security.ProviderException- If error occurred when creating the provider.
-
loadPKCS11Keystore
java.security.KeyStore loadPKCS11Keystore(char[] password) throws java.security.KeyStoreException, java.security.cert.CertificateException, java.security.NoSuchAlgorithmException, java.io.IOExceptionLoad the PKCS#11 keystore and make it available for use.- Parameters:
password- PKCS#11 Password to use when loading keystore- Returns:
- Java PKCS#11 keystore
- Throws:
java.security.KeyStoreException- If error occurred when instantiating the keystore.java.security.cert.CertificateException- If any of the certificates in the keystore could not be loaded.java.security.NoSuchAlgorithmException- if the algorithm used to check the integrity of the keystore cannot be foundjava.io.IOException- If there was a problem loading the keystore (not found or incorrect password).
-
-