Class HSMKeystore


  • public final class HSMKeystore
    extends java.lang.Object

    Class that manages all the operations related with HSM keystores.

    Project:

    Library for the integration with the services of @Firma, eVisor and TS@.

    Version:
    1.0, 10/12/2014.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.security.cert.X509Certificate getCertificate​(java.lang.String alias)
      Method that obtains a certificate from a HSM by the alias.
      static java.security.PrivateKey getPrivateKey​(java.lang.String alias)
      Method that obtains a private key from a HSM by the alias.
      static java.security.KeyStore.PrivateKeyEntry getPrivateKeyEntry​(java.lang.String alias)
      Method that obtains a private key entry from a HSM by the alias.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getPrivateKey

        public static java.security.PrivateKey getPrivateKey​(java.lang.String alias)
                                                      throws HSMException
        Method that obtains a private key from a HSM by the alias.
        Parameters:
        alias - Parameter that represents the alias of the private key.
        Returns:
        an object that represents the private key.
        Throws:
        HSMException - If the private key cannot be retrieved.
      • getCertificate

        public static java.security.cert.X509Certificate getCertificate​(java.lang.String alias)
                                                                 throws HSMException
        Method that obtains a certificate from a HSM by the alias.
        Parameters:
        alias - Parameter that represents the alias of the certificate.
        Returns:
        an object that represents the certificate.
        Throws:
        HSMException - If the certificate cannot be retrieved.
      • getPrivateKeyEntry

        public static java.security.KeyStore.PrivateKeyEntry getPrivateKeyEntry​(java.lang.String alias)
                                                                         throws HSMException
        Method that obtains a private key entry from a HSM by the alias.
        Parameters:
        alias - Parameter that represents the alias of the private key entry.
        Returns:
        an object that represents the private key entry.
        Throws:
        HSMException - If the private key entry cannot be retrieved.