Interface PKCS11ProviderManager

  • All Known Implementing Classes:
    DefaultPKCS11ProviderManager

    public interface PKCS11ProviderManager
    Interface to support a PKCS#11 provider manager in charge of creating, adding and loading a java PKCS#11 keystore.
    • Method Detail

      • addPKCS11Provider

        java.lang.String addPKCS11Provider​(java.io.InputStream config)
                                    throws java.lang.SecurityException,
                                           java.lang.NullPointerException,
                                           java.security.ProviderException
        Create 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 provider
        java.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.IOException
        Load 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 found
        java.io.IOException - If there was a problem loading the keystore (not found or incorrect password).