| java.lang.Object org.apache.harmony.tools.keytool.KeyCertGenerator
KeyCertGenerator | public class KeyCertGenerator (Code) | | Class for generating keys and key pairs, wrapping them into self-signed X.509
certificates.
|
Method Summary | |
static void | genKey(KeytoolParameters param) Generates a key pair or a secret key. | static void | selfCert(KeytoolParameters param) Generates an X.509 (v1, v2, v3) self-signed certificate using a key pair
associated with alias defined in param. |
genKey | static void genKey(KeytoolParameters param) throws NoSuchAlgorithmException, KeyStoreException, KeytoolException, InvalidKeyException, NoSuchProviderException, SignatureException, IOException, UnrecoverableKeyException, CertificateException(Code) | | Generates a key pair or a secret key. Key pair is composed of a private
and a public key. Method wraps the public key into a self-signed X.509
(v1, v2, v3) certificate and puts the certificate into a single-element
certificate chain or signs the certificate with private key from another
key entry and adds its chain to the newly generated certificate . After
that the method adds to the keystore a new entry containing the generated
private key and the chain. If a secret key is generated it is put into a
secret key entry, with null certificate chain.
throws: NoSuchAlgorithmException - throws: KeyStoreException - throws: KeytoolException - throws: IOException - throws: SignatureException - throws: NoSuchProviderException - throws: InvalidKeyException - throws: UnrecoverableKeyException - throws: CertificateException - |
selfCert | static void selfCert(KeytoolParameters param) throws NoSuchAlgorithmException, KeyStoreException, UnrecoverableKeyException, InvalidKeyException, SignatureException, NoSuchProviderException, IOException, KeytoolException, CertificateException(Code) | | Generates an X.509 (v1, v2, v3) self-signed certificate using a key pair
associated with alias defined in param. If X.500 Distinguished Name is
supplied in param it is used as both subject and issuer of the
certificate. Otherwise the distinguished name associated with alias is
used. Signature algorithm, validity period and certificate serial number
are taken from param if defined there or from the keystore entry
identified by alias.
throws: NoSuchAlgorithmException - throws: KeyStoreException - throws: UnrecoverableKeyException - throws: IOException - throws: NoSuchProviderException - throws: SignatureException - throws: InvalidKeyException - throws: KeytoolException - throws: CertificateException - |
|
|