Package org.mozilla.jss.pkix.crmf
Class CertReqMsg
java.lang.Object
org.mozilla.jss.pkix.crmf.CertReqMsg
- All Implemented Interfaces:
ASN1Value
This class models a CRMF CertReqMsg structure.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
A class for decoding CertReqMsg structures from a BER encoding. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CertRequest
private ProofOfPossession
private SEQUENCE
static final Tag
private static final CertReqMsg.Template
-
Constructor Summary
ConstructorsConstructorDescriptionCertReqMsg
(CertRequest certReq, ProofOfPossession pop, SEQUENCE regInfo) Constructs a CertReqmsg from a CertRequest and, optionally, a pop and a regInfo. -
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(OutputStream ostream) Encodes this CertReqMsg to the given OutputStream using DER encoding.void
encode
(Tag implicit, OutputStream ostream) Encodes this CertReqMsg to the given OutputStream using DER encoding, with the given implicit tag.Retrieves the CertRequest contained in this structure.getPop()
Returns the pop field.Returns the regInfo field.getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static CertReqMsg.Template
boolean
hasPop()
Returnstrue
if this CertReqMsg has a pop field.boolean
Returnstrue
if this CertReqMsg has a regInfo field.static void
void
verify()
void
verify
(CryptoToken token)
-
Field Details
-
TAG
-
certReq
-
regInfo
-
pop
-
templateInstance
-
-
Constructor Details
-
CertReqMsg
Constructs a CertReqmsg from a CertRequest and, optionally, a pop and a regInfo.- Parameters:
pop
- May be NULL.regInfo
- May be NULL.
-
-
Method Details
-
getTag
Description copied from interface:ASN1Value
Returns the base tag for this type, not counting any tags that may be imposed on it by its context. -
getCertReq
Retrieves the CertRequest contained in this structure. -
hasRegInfo
public boolean hasRegInfo()Returnstrue
if this CertReqMsg has a regInfo field. -
getRegInfo
Returns the regInfo field. Should only be called if the field is present. -
hasPop
public boolean hasPop()Returnstrue
if this CertReqMsg has a pop field. -
getPop
Returns the pop field. Should only be called if the field is present. -
verify
public void verify() throws SignatureException, InvalidKeyFormatException, NoSuchAlgorithmException, NotInitializedException, TokenException, InvalidKeyException, IOException -
verify
public void verify(CryptoToken token) throws SignatureException, InvalidKeyFormatException, NoSuchAlgorithmException, TokenException, InvalidKeyException, IOException -
encode
Encodes this CertReqMsg to the given OutputStream using DER encoding.- Specified by:
encode
in interfaceASN1Value
- Parameters:
ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
encode
Encodes this CertReqMsg to the given OutputStream using DER encoding, with the given implicit tag.- Specified by:
encode
in interfaceASN1Value
- Parameters:
implicit
- Implicit tag.ostream
- Output stream.- Throws:
IOException
- If an error occurred.
-
getTemplate
-
main
-