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 classA class for decoding CertReqMsg structures from a BER encoding. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CertRequestprivate ProofOfPossessionprivate SEQUENCEstatic final Tagprivate 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 TypeMethodDescriptionvoidencode(OutputStream ostream) Encodes this CertReqMsg to the given OutputStream using DER encoding.voidencode(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.TemplatebooleanhasPop()Returnstrueif this CertReqMsg has a pop field.booleanReturnstrueif this CertReqMsg has a regInfo field.static voidvoidverify()voidverify(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:ASN1ValueReturns 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()Returnstrueif this CertReqMsg has a regInfo field. -
getRegInfo
Returns the regInfo field. Should only be called if the field is present. -
hasPop
public boolean hasPop()Returnstrueif 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:
encodein 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:
encodein interfaceASN1Value- Parameters:
implicit- Implicit tag.ostream- Output stream.- Throws:
IOException- If an error occurred.
-
getTemplate
-
main
-