Package es.gob.afirma.hsm
Class HSMKeystore
- java.lang.Object
-
- es.gob.afirma.hsm.HSMKeystore
-
public final class HSMKeystore extends java.lang.ObjectClass 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.X509CertificategetCertificate(java.lang.String alias)Method that obtains a certificate from a HSM by the alias.static java.security.PrivateKeygetPrivateKey(java.lang.String alias)Method that obtains a private key from a HSM by the alias.static java.security.KeyStore.PrivateKeyEntrygetPrivateKeyEntry(java.lang.String alias)Method that obtains a private key entry from a HSM by the alias.
-
-
-
Method Detail
-
getPrivateKey
public static java.security.PrivateKey getPrivateKey(java.lang.String alias) throws HSMExceptionMethod 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 HSMExceptionMethod 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 HSMExceptionMethod 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.
-
-