Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.security

Class KeyStoreSpi

java.lang.Object
|
+--java.security.KeyStoreSpi


public abstract class KeyStoreSpi

extends Object

KeyStoreSpi is the Service Provider Interface (SPI) for the KeyStore class. This is the interface for providers to supply to implement a keystore for a particular keystore type.

Since:Author:

Constructor Summary

KeyStoreSpi()

Constructs a new KeyStoreSpi

Method Summary

java.util.EnumerationengineAliases()

Generates a list of all the aliases in the keystore.
booleanengineContainsAlias(java.lang.String alias)

Determines if the keystore contains the specified alias.
voidengineDeleteEntry(java.lang.String alias)

Deletes the entry for the specified entry.
java.security.cert.CertificateengineGetCertificate(java.lang.String alias)

Gets a Certificate for the specified alias.
java.lang.StringengineGetCertificateAlias(java.security.cert. Certificate cert)

Determines if the keystore contains the specified certificate entry and returns the alias.
java.security.cert.Certificate[]engineGetCertificateChain(java.lang.String alias)

Gets a Certificate chain for the specified alias.
java.util.DateengineGetCreationDate(java.lang.String alias)

Gets entry creation date for the specified alias.
java.security.KeyengineGetKey(java.lang.String alias, char[] )

Returns the key associated with given alias using the supplied password.
booleanengineIsCertificateEntry(java.lang.String alias)

Determines if the keystore contains a certificate entry for the specified alias.
booleanengineIsKeyEntry(java.lang.String alias)

Determines if the keystore contains a key entry for the specified alias.
voidengineLoad(java.io.InputStream stream, char[] )

Loads the keystore from the specified input stream and it uses the specified password to check for integrity if supplied.
voidengineSetCertificateEntry(java.lang.String alias, java.security.cert. Certificate cert)

Assign the certificate to the alias in the keystore.
voidengineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] , java.security.cert. Certificate[]chain)

Assign the key to the alias in the keystore, protecting it with the given password.
voidengineSetKeyEntry(java.lang.String alias, byte[] , java.security.cert. Certificate[]chain)

Assign the key to the alias in the keystore.
intengineSize()

Returns the number of entries in the keystore.
voidengineStore(java.io.OutputStream stream, char[] )

Stores the keystore in the specified output stream and it uses the specified key it keep it secure.

Constructor Details

KeyStoreSpi

public KeyStoreSpi()

Constructs a new KeyStoreSpi


Method Details

engineAliases

public Enumeration engineAliases()

Generates a list of all the aliases in the keystore.

Returns:


engineContainsAlias

public boolean engineContainsAlias(java.lang.String alias)

Determines if the keystore contains the specified alias.

Parameters:

Returns:


engineDeleteEntry

public void engineDeleteEntry(java.lang.String alias)

Deletes the entry for the specified entry.

Parameters:

Throws:


engineGetCertificate

public Certificate engineGetCertificate(java.lang.String alias)

Gets a Certificate for the specified alias. If there is a trusted certificate entry then that is returned. it there is a key entry with a certificate chain then the first certificate is return or else null.

Parameters:

Returns:


engineGetCertificateAlias

public String engineGetCertificateAlias(java.security.cert. Certificate cert)

Determines if the keystore contains the specified certificate entry and returns the alias. It checks every entry and for a key entry checks only the first certificate in the chain.

Parameters:

Returns:


engineGetCertificateChain

public Certificate[] engineGetCertificateChain(java.lang.String alias)

Gets a Certificate chain for the specified alias.

Parameters:

Returns:


engineGetCreationDate

public Date engineGetCreationDate(java.lang.String alias)

Gets entry creation date for the specified alias.

Parameters:


engineGetKey

public Key engineGetKey(java.lang.String alias, char[] )

Returns the key associated with given alias using the supplied password.

Parameters:

Returns:

Throws:


engineIsCertificateEntry

public boolean engineIsCertificateEntry(java.lang.String alias)

Determines if the keystore contains a certificate entry for the specified alias.

Parameters:

Returns:


engineIsKeyEntry

public boolean engineIsKeyEntry(java.lang.String alias)

Determines if the keystore contains a key entry for the specified alias.

Parameters:

Returns:


engineLoad

public void engineLoad(java.io.InputStream stream, char[] )

Loads the keystore from the specified input stream and it uses the specified password to check for integrity if supplied.

Parameters:

Throws:


engineSetCertificateEntry

public void engineSetCertificateEntry(java.lang.String alias, java.security.cert. Certificate cert)

Assign the certificate to the alias in the keystore. It will overwrite an existing entry.

Parameters:

Throws:


engineSetKeyEntry

public void engineSetKeyEntry(java.lang.String alias, byte[] , java.security.cert. Certificate[]chain)

Assign the key to the alias in the keystore. It will overwrite an existing entry and if the key is a PrivateKey, also add the certificate chain representing the corresponding public key.

Parameters:

Throws:


engineSetKeyEntry

public void engineSetKeyEntry(java.lang.String alias, java.security.Key key, char[] , java.security.cert. Certificate[]chain)

Assign the key to the alias in the keystore, protecting it with the given password. It will overwrite an existing entry and if the key is a PrivateKey, also add the certificate chain representing the corresponding public key.

Parameters:

Throws:


engineSize

public int engineSize()

Returns the number of entries in the keystore.


engineStore

public void engineStore(java.io.OutputStream stream, char[] )

Stores the keystore in the specified output stream and it uses the specified key it keep it secure.

Parameters:

Throws: