org.mozilla.jss.pkcs10
public class CertificationRequest extends Object implements ASN1Value
Nested Class Summary | |
---|---|
static class | CertificationRequest.Template |
Constructor Summary | |
---|---|
CertificationRequest(CertificationRequestInfo info, PrivateKey privKey, SignatureAlgorithm signingAlg)
Creates and signs an X.509 CertificationRequest. |
Method Summary | |
---|---|
void | encode(OutputStream ostream) |
void | encode(Tag implicitTag, OutputStream ostream) |
CertificationRequestInfo | getInfo()
Returns the information (TBSCertificationRequest) contained in this CertificationRequest. |
Tag | getTag() |
static CertificationRequest.Template | getTemplate() |
static void | main(String[] argv) |
void | verify()
Verifies the signature on this CertificationRequest. |
void | verify(PublicKey key)
Verifies the signature on this CertificationRequest, using the given public key.
|
void | verify(PublicKey key, CryptoToken token)
Verifies the signature on this CertificationRequest, using the given public
key and CryptoToken. |
Parameters: info A CertificationRequestInfo (TBSCertificationRequest), which specifies the actual information of the CertificationRequest. privKey The private key with which to sign the certificat. signingAlg The algorithm to use to sign the CertificationRequest. It must match the algorithm specified in the CertificationRequestInfo.
Throws: IOException If an error occurred while encoding the CertificationRequest. CryptoManager.NotInitializedException Because this operation involves cryptography (signing), CryptoManager must be initialized before calling it. TokenException If an error occurs on a PKCS #11 token. NoSuchAlgorithmException If the OID for the signing algorithm cannot be located. CertificateException If the signing algorithm specified as a parameter does not match the one in the CertificationRequest info. InvalidKeyException If the key does not match the signing algorithm. SignatureException If an error occurs while signing the CertificationRequest.