Class sun.security.jsafe.KeyStore
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.security.jsafe.KeyStore

java.lang.Object
   |
   +----sun.security.jsafe.KeyStore

public final class KeyStore
extends Object
Peristent storage for an RSA private key and its associated X.509 certificate chain. This key storage is currently specific to the JSAFE provider.

This is interface will not remain in this form! Currently recognized problems/flaws include:


Constructor Index

 o KeyStore(Key, CertChain)
Initializes an in-memory key store from a private key and an X.509 certificate chain.
 o KeyStore(String)
Initializes an in-memory key store from one stored on disk.

Method Index

 o getCertChain()
Returns the X.509 RSA public key certificate chain from this KeyStore.
 o getPath()
Returns the directory where the keys are stored, or null if the keys don't yet have a persistent representation.
 o getPrivateKey()
Returns the RSA private key from this KeyStore.
 o store(String)
Stores the certificate chain and private key in a directory from which they may later be retrieved.

Constructors

 o KeyStore
  public KeyStore(Key privateKey,
                  CertChain publicKey) throws InvalidKeyException
Initializes an in-memory key store from a private key and an X.509 certificate chain. The keys should be explicitly stored in some directory, after this initializes the in-memory state.
Parameters:
privateKey - a JSAFE RSA private key
publicKey - the first certificate holds the RSA public key matching privateKey, the rest are a certificate chain where each is signed by the next and the last is signed by itself.
See Also:
store
 o KeyStore
  public KeyStore(String directory) throws IOException
Initializes an in-memory key store from one stored on disk.
Parameters:
directory - path to the directory holding the private key and the associated certificate chain.
See Also:
store

Methods

 o store
  public void store(String directory) throws IOException
Stores the certificate chain and private key in a directory from which they may later be retrieved.
Parameters:
directory - path to the directory holding the private key and the associated certificate chain.
 o getPrivateKey
  public Key getPrivateKey()
Returns the RSA private key from this KeyStore.
 o getCertChain
  public CertChain getCertChain()
Returns the X.509 RSA public key certificate chain from this KeyStore.
 o getPath
  public String getPath()
Returns the directory where the keys are stored, or null if the keys don't yet have a persistent representation. Additional files (e.g. a database of certificates issued) may be stored in this directory.

All Packages  Class Hierarchy  This Package  Previous  Next  Index