Creates an X.509 certificate, and signs it using the given key
(associating a signature algorithm and an X.500 name).
This operation is used to implement the certificate generation
functionality of a certificate authority.
@param key the private key used for signing.
@param algorithm the name of the signature algorithm used.
@exception InvalidKeyException on incorrect key.
@exception NoSuchAlgorithmException on unsupported signature
algorithms.
@exception NoSuchProviderException if there's no default provider.
@exception SignatureException on signature errors.
@exception CertificateException on encoding errors.
Creates an X.509 certificate, and signs it using the given key (associating a signature algorithm and an X.500 name). This operation is used to implement the certificate generation functionality of a certificate authority.
@param key the private key used for signing. @param algorithm the name of the signature algorithm used.
@exception InvalidKeyException on incorrect key. @exception NoSuchAlgorithmException on unsupported signature algorithms. @exception NoSuchProviderException if there's no default provider. @exception SignatureException on signature errors. @exception CertificateException on encoding errors.