org.mozilla.jss.pkcs10
Class CertificationRequest
java.lang.Object
org.mozilla.jss.pkcs10.CertificationRequest
- ASN1Value
public class CertificationRequest
extends java.lang.Object
A pkcs10 signed CertificationRequest.
void | encode(OutputStream ostream) - Write this value's DER encoding to an output stream using
its own base tag.
|
void | encode(Tag implicitTag, OutputStream ostream) - Write this value's DER encoding to an output stream using
an implicit tag.
|
CertificationRequestInfo | getInfo() - Returns the information (TBSCertificationRequest) contained in this CertificationRequest.
|
Tag | getTag() - Returns the base tag for this type, not counting any tags
that may be imposed on it by its context.
|
static CertificationRequest.Template | getTemplate()
|
static void | main(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.
|
CertificationRequest
public CertificationRequest(CertificationRequestInfo info,
java.security.PrivateKey privKey,
SignatureAlgorithm signingAlg)
throws IOException,
CryptoManager.NotInitializedException,
TokenException,
NoSuchAlgorithmException,
CertificateException,
InvalidKeyException,
SignatureException
Creates and signs an X.509 CertificationRequest.
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.
encode
public void encode(OutputStream ostream)
throws IOException
Write this value's DER encoding to an output stream using
its own base tag.
- encode in interface ASN1Value
encode
public void encode(Tag implicitTag,
OutputStream ostream)
throws IOException
Write this value's DER encoding to an output stream using
an implicit tag.
- encode in interface ASN1Value
getInfo
public CertificationRequestInfo getInfo()
Returns the information (TBSCertificationRequest) contained in this CertificationRequest.
getTag
public Tag getTag()
Returns the base tag for this type, not counting any tags
that may be imposed on it by its context.
- getTag in interface ASN1Value
main
public static void main(argv[] )
verify
public void verify(PublicKey key)
throws InvalidKeyException,
CryptoManager.NotInitializedException,
NoSuchAlgorithmException,
CertificateException,
TokenException,
SignatureException
Verifies the signature on this CertificationRequest, using the given public key.
Does not indicate the CertificationRequest is valid at any specific time.
verify
public void verify(PublicKey key,
CryptoToken token)
throws NoSuchAlgorithmException,
CertificateException,
TokenException,
SignatureException,
InvalidKeyException
Verifies the signature on this CertificationRequest, using the given public
key and CryptoToken. Does not indicate the CertificationRequest is valid at
any specific time.