Class Pkcs11KeyStoreReloader

java.lang.Object
se.swedenconnect.security.credential.pkcs11.Pkcs11KeyStoreReloader
All Implemented Interfaces:
KeyStoreReloader

public class Pkcs11KeyStoreReloader extends Object implements KeyStoreReloader
The default implementation of the KeyStoreReloader interface.
Author:
Martin Lindström
  • Constructor Details

    • Pkcs11KeyStoreReloader

      public Pkcs11KeyStoreReloader(@Nonnull char[] pin)
      Constructor assigning the PIN code.
      Parameters:
      pin - the HSM PIN
  • Method Details

    • reload

      public void reload(@Nonnull KeyStore keyStore) throws KeyStoreException
      Reloads a PKCS#11 KeyStore.
      Specified by:
      reload in interface KeyStoreReloader
      Parameters:
      keyStore - the PKCS#11 KeyStore
      Throws:
      KeyStoreException - for error reloading the keystore
    • destroy

      @PreDestroy public void destroy()
      Method that clears the PIN-code. Will be automatically invoked if the instance is a bean controlled by a framework that manages bean (Spring, Quarkus, ...).