Package org.mozilla.jss.pkix.crmf
Class CertReqMsg
- java.lang.Object
-
- org.mozilla.jss.pkix.crmf.CertReqMsg
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCertReqMsg.TemplateA class for decoding CertReqMsg structures from a BER encoding.
-
Constructor Summary
Constructors Constructor Description CertReqMsg(CertRequest certReq, ProofOfPossession pop, SEQUENCE regInfo)Constructs a CertReqmsg from a CertRequest and, optionally, a pop and a regInfo.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidencode(java.io.OutputStream ostream)Encodes this CertReqMsg to the given OutputStream using DER encoding.voidencode(Tag implicit, java.io.OutputStream ostream)Encodes this CertReqMsg to the given OutputStream using DER encoding, with the given implicit tag.CertRequestgetCertReq()Retrieves the CertRequest contained in this structure.ProofOfPossessiongetPop()Returns the pop field.SEQUENCEgetRegInfo()Returns the regInfo field.TaggetTag()Returns the base tag for this type, not counting any tags that may be imposed on it by its context.static CertReqMsg.TemplategetTemplate()booleanhasPop()Returnstrueif this CertReqMsg has a pop field.booleanhasRegInfo()Returnstrueif this CertReqMsg has a regInfo field.static voidmain(java.lang.String[] args)voidverify()voidverify(CryptoToken token)
-
-
-
Field Detail
-
TAG
public static final Tag TAG
-
-
Constructor Detail
-
CertReqMsg
public CertReqMsg(CertRequest certReq, ProofOfPossession pop, SEQUENCE regInfo)
Constructs a CertReqmsg from a CertRequest and, optionally, a pop and a regInfo.- Parameters:
pop- May be NULL.regInfo- May be NULL.
-
-
Method Detail
-
getTag
public Tag 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
public CertRequest getCertReq()
Retrieves the CertRequest contained in this structure.
-
hasRegInfo
public boolean hasRegInfo()
Returnstrueif this CertReqMsg has a regInfo field.
-
getRegInfo
public SEQUENCE 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
public ProofOfPossession getPop()
Returns the pop field. Should only be called if the field is present.
-
verify
public void verify() throws java.security.SignatureException, InvalidKeyFormatException, java.security.NoSuchAlgorithmException, NotInitializedException, TokenException, java.security.InvalidKeyException, java.io.IOException- Throws:
java.security.SignatureExceptionInvalidKeyFormatExceptionjava.security.NoSuchAlgorithmExceptionNotInitializedExceptionTokenExceptionjava.security.InvalidKeyExceptionjava.io.IOException
-
verify
public void verify(CryptoToken token) throws java.security.SignatureException, InvalidKeyFormatException, java.security.NoSuchAlgorithmException, NotInitializedException, TokenException, java.security.InvalidKeyException, java.io.IOException
- Throws:
java.security.SignatureExceptionInvalidKeyFormatExceptionjava.security.NoSuchAlgorithmExceptionNotInitializedExceptionTokenExceptionjava.security.InvalidKeyExceptionjava.io.IOException
-
encode
public void encode(java.io.OutputStream ostream) throws java.io.IOExceptionEncodes this CertReqMsg to the given OutputStream using DER encoding.
-
encode
public void encode(Tag implicit, java.io.OutputStream ostream) throws java.io.IOException
Encodes this CertReqMsg to the given OutputStream using DER encoding, with the given implicit tag.
-
getTemplate
public static CertReqMsg.Template getTemplate()
-
main
public static void main(java.lang.String[] args)
-
-