Package com.fortanix.sdkms.jce.provider
Class SdkmsKeyStore
- java.lang.Object
-
- java.security.KeyStoreSpi
-
- com.fortanix.sdkms.jce.provider.KeyStore
-
- com.fortanix.sdkms.jce.provider.SdkmsKeyStore
-
public final class SdkmsKeyStore extends KeyStore
-
-
Constructor Summary
Constructors Constructor Description SdkmsKeyStore()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration<java.lang.String>engineAliases()Lists all the alias names of this keystore.booleanengineContainsAlias(java.lang.String alias)voidengineDeleteEntry(java.lang.String alias)Deletes the entry from sdkmsjava.lang.StringengineGetCertificateAlias(java.security.cert.Certificate cert)java.security.cert.Certificate[]engineGetCertificateChain(java.lang.String alias)Throw an exception as we do not store certificate chain.java.util.DateengineGetCreationDate(java.lang.String alias)java.security.KeyengineGetKey(java.lang.String name, char[] password)Returns the key associated with the given alias, using the given password to recover it.booleanengineIsCertificateEntry(java.lang.String alias)booleanengineIsKeyEntry(java.lang.String alias)voidengineLoad(java.io.InputStream stream, char[] password)Loads the groupid from the given input stream.voidengineSetCertificateEntry(java.lang.String alias, java.security.cert.Certificate cert)voidengineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] password, java.security.cert.Certificate[] chain)intengineSize()throw exception as we do not get the size from sdkms.voidengineStore(java.io.OutputStream stream, char[] password)No need to storing the keys as it is managed by sdkms.-
Methods inherited from class com.fortanix.sdkms.jce.provider.KeyStore
engineGetCertificate, engineSetKeyEntry, setCertificateEntry
-
-
-
-
Method Detail
-
engineLoad
public void engineLoad(java.io.InputStream stream, char[] password) throws java.io.IOExceptionLoads the groupid from the given input stream.- Specified by:
engineLoadin classKeyStore- Parameters:
stream- the input stream from which the groupid is loadedpassword- the (optional) password- Throws:
java.io.IOException- if there is an I/O or format problem with string
-
engineStore
public void engineStore(java.io.OutputStream stream, char[] password) throws java.io.IOExceptionNo need to storing the keys as it is managed by sdkms.- Specified by:
engineStorein classKeyStore- Throws:
java.io.IOException
-
engineAliases
public java.util.Enumeration<java.lang.String> engineAliases()
Lists all the alias names of this keystore.- Specified by:
engineAliasesin classKeyStore- Returns:
- enumeration of the alias names
-
engineGetCertificateChain
public java.security.cert.Certificate[] engineGetCertificateChain(java.lang.String alias)
Throw an exception as we do not store certificate chain.- Specified by:
engineGetCertificateChainin classKeyStore
-
engineGetCreationDate
public java.util.Date engineGetCreationDate(java.lang.String alias)
- Specified by:
engineGetCreationDatein classKeyStore
-
engineGetKey
public java.security.Key engineGetKey(java.lang.String name, char[] password) throws java.security.NoSuchAlgorithmException, java.security.UnrecoverableKeyExceptionReturns the key associated with the given alias, using the given password to recover it.- Specified by:
engineGetKeyin classKeyStore- Parameters:
name- the alias namepassword- : always null- Returns:
- the requested key, or null if the given alias does not exist or does not identify a key entry.
- Throws:
java.security.NoSuchAlgorithmExceptionjava.security.UnrecoverableKeyException
-
engineSetKeyEntry
public void engineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] password, java.security.cert.Certificate[] chain) throws java.security.KeyStoreException- Specified by:
engineSetKeyEntryin classKeyStore- Throws:
java.security.KeyStoreException
-
engineDeleteEntry
public void engineDeleteEntry(java.lang.String alias) throws java.security.KeyStoreExceptionDeletes the entry from sdkms- Specified by:
engineDeleteEntryin classKeyStore- Throws:
java.security.KeyStoreException
-
engineContainsAlias
public boolean engineContainsAlias(java.lang.String alias)
- Specified by:
engineContainsAliasin classjava.security.KeyStoreSpi
-
engineSize
public int engineSize()
throw exception as we do not get the size from sdkms.- Specified by:
engineSizein classKeyStore
-
engineIsKeyEntry
public boolean engineIsKeyEntry(java.lang.String alias)
- Specified by:
engineIsKeyEntryin classKeyStore
-
engineIsCertificateEntry
public boolean engineIsCertificateEntry(java.lang.String alias)
- Specified by:
engineIsCertificateEntryin classKeyStore
-
engineGetCertificateAlias
public java.lang.String engineGetCertificateAlias(java.security.cert.Certificate cert)
- Specified by:
engineGetCertificateAliasin classKeyStore
-
engineSetCertificateEntry
public void engineSetCertificateEntry(java.lang.String alias, java.security.cert.Certificate cert)- Specified by:
engineSetCertificateEntryin classKeyStore
-
-