Class HsmPkiCredentialContainer

All Implemented Interfaces:
PkiCredentialContainer

public class HsmPkiCredentialContainer extends AbstractKeyStorePkiCredentialContainer
Implements a PkiCredentialContainer based on an HSM.
Author:
Martin Lindström (martin@idsec.se), Stefan Santesson (stefan@idsec.se)
  • Constructor Details

    • HsmPkiCredentialContainer

      public HsmPkiCredentialContainer(@Nonnull Provider p11Provider, @Nonnull String hsmPin) throws KeyStoreException
      Constructor for the default PKCS11 credential container where keys are stored in an HSM slot.
      Parameters:
      p11Provider - the provider that provides access to the HSM key slot used to generate and store keys
      hsmPin - the PIN for the associated HSM slot
      Throws:
      KeyStoreException - error initiating the HSM slot key store
    • HsmPkiCredentialContainer

      public HsmPkiCredentialContainer(@Nonnull Pkcs11Configuration p11Configuration, @Nonnull String hsmPin) throws KeyStoreException
      Constructor accepting a Pkcs11Configuration object for getting the PKCS#11 provider.
      Parameters:
      p11Configuration - the PKCS#11 configuration
      hsmPin - the PIN for the HSM slot
      Throws:
      KeyStoreException - error initiating the HSM slot key store
    • HsmPkiCredentialContainer

      public HsmPkiCredentialContainer(@Nonnull String p11ConfigurationFile, @Nonnull String hsmPin) throws KeyStoreException
      Constructor accepting a PKCS#11 configuration file for getting the PKCS#11 provider.
      Parameters:
      p11ConfigurationFile - the full path to the PKCS#11 configuration file
      hsmPin - the PIN for the HSM slot
      Throws:
      KeyStoreException - error initiating the HSM slot key store
  • Method Details