All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----sun.security.CertStore
The chains of X.509 certificates are provided by organizations called certificate authorities, or CAs. Identities (including CAs) use their private keys to authenticate their association with objects, such as with channels which are secured using SSL, with archives of code they signed, or (for CAs) with X.509 certificates they have issued. As a bootstrapping tool, self-signed certificates may be used until a certificate authority returns a certificate chain.
The private keys in this database are always stored in encrypted form, to make it difficult to disclose these private keys inappropriately. A passphrase is required to access or modify the database.
These private keys are encrypted using a "passphrase", which should be several words long. You should guard the passphrase extremely carefully! If you lose that passphrase, you will not be able to recover those authentication keys. However, if you let someone else know it, they will either be able to tell you when you forget, or they will be able to masquerade as you without your consent. So you should not tell it to anyone you don't trust to act on your behalf. Misuse of your keys could incur substantial liability for you.
public static void main(String argv[])
Option | Description |
---|---|
-certresp filename |
Imports a certificate chain, as provided by a certificate authority, into the keystore. This replaces an existing certificate chain, for example one with only a self-signed certificate, or a certificate chain which may no longer be within its validity period. An alias must be specified. Use the csr command to generate a certificate request. |
-clone original |
Creates a new entry, which has the same private key and certificate chain as the original entry. This might be used get multiple certificate chains corresponding to a given keypair, or for backup purposes. |
-csr filename |
Generates a Certificate Signing Request (CSR), using the PKCS #10 format and storing the certificate request in the named file. Such requests are sent to certificate authorities (CAs). CAs will authenticate the certificate requestor (usually off-line) and will return a certificate chain as a response, used to replace the existing (e.g. self-signed) certificate chain. Requires an alias to be specified; the private key and X.500 name associated with that alias are used to create the PKCS10 certificate request. Use the certrespoption to import the CA's response. |
-delete |
Deletes an existing entry, both private key and certificate chain. User confirmation is required for this command. |
-help |
Lists all command-line options. |
-list |
Lists all the entries in the keystore. This command is the default. |
-selfcert |
Generates a new public/private key pair, and authenticates the public key using a single-element certificate chain suitable for use when serving "HTTPS" (HTTP over SSLv3). You will be prompted for some fields to be used in the X.500 name. At this time, this is the only way to create an entry in the keystore, other than cloning an entry. Requires an alias name to be specified; the new self-signed certificate is stored under that alias. |
Option | Description |
---|---|
-keysize size |
Specifies the size of the public key to generate using the selfcert command. The default is 768 bits, except in exportable versions (where 512 bits is the maximum allowed by US export laws). |
-keytype type |
Specifies the type of key to use. This defaults to RSA; the keytype must be usable with the signature algorithm. |
-signature sigalg |
Specifies the type of signature used when creating self-signed certificates. This implies use of the appropriate kind of key. Some keys, such as RSA keys, may be used with many kinds of signature algorithms. The default signature algorithm is MD5withRSA. The DSA (DSS) algorithm may also used for some applications. |
-validity days |
Specifies the validity period of a self-signed certificate, in days. This value defaults to ninety days. |
-verbose |
More output than usual is provided. |
Option | Description |
---|---|
-alias name |
Gives the alias for the certificate chain (and private key) which are of interest. If not supplied, the value ssl-RSA-default is used. |
-keystore path |
Gives the path to the keystore to be used. This parameter must be supplied. |
All Packages Class Hierarchy This Package Previous Next Index