org.mozilla.jss.pkix.crmf

Class CertReqMsg

Implemented Interfaces:
ASN1Value

public class CertReqMsg
extends java.lang.Object
implements ASN1Value

This class models a CRMF CertReqMsg structure.

Nested Class Summary

static class
CertReqMsg.Template
A class for decoding CertReqMsg structures from a BER encoding.

Field Summary

static Tag
TAG

Constructor Summary

CertReqMsg(CertRequest certReq, ProofOfPossession pop, SEQUENCE regInfo)
Constructs a CertReqmsg from a CertRequest and, optionally, a pop>/i> and a regInfo.

Method Summary

void
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.
CertRequest
getCertReq()
Retrieves the CertRequest contained in this structure.
ProofOfPossession
getPop()
Returns the pop field.
SEQUENCE
getRegInfo()
Returns the regInfo field.
Tag
getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
static CertReqMsg.Template
getTemplate()
boolean
hasPop()
Returns true if this CertReqMsg has a pop field.
boolean
hasRegInfo()
Returns true if this CertReqMsg has a regInfo field.
static void
main(args[] )
void
verify()

Field Details

TAG

public static final Tag TAG

Constructor Details

CertReqMsg

public CertReqMsg(CertRequest certReq,
                  ProofOfPossession pop,
                  SEQUENCE regInfo)
Constructs a CertReqmsg from a CertRequest and, optionally, a pop>/i> and a regInfo.
Parameters:
pop - May be NULL.
regInfo - May be NULL.

Method Details

encode

public void encode(OutputStream ostream)
            throws IOException
Encodes this CertReqMsg to the given OutputStream using DER encoding.
Specified by:
encode in interface ASN1Value

encode

public void encode(Tag implicit,
                   OutputStream ostream)
            throws IOException
Encodes this CertReqMsg to the given OutputStream using DER encoding, with the given implicit tag.
Specified by:
encode in interface ASN1Value

getCertReq

public CertRequest getCertReq()
Retrieves the CertRequest contained in this structure.

getPop

public ProofOfPossession getPop()
Returns the pop field. Should only be called if the field is present.

getRegInfo

public SEQUENCE getRegInfo()
Returns the regInfo field. Should only be called if the field is present.

getTag

public Tag getTag()
Returns the base tag for this type, not counting any tags that may be imposed on it by its context.
Specified by:
getTag in interface ASN1Value

getTemplate

public static CertReqMsg.Template getTemplate()

hasPop

public boolean hasPop()
Returns true if this CertReqMsg has a pop field.

hasRegInfo

public boolean hasRegInfo()
Returns true if this CertReqMsg has a regInfo field.

main

public static void main(args[] )

verify

public void verify()
            throws SignatureException,
                   InvalidKeyFormatException,
                   NoSuchAlgorithmException,
                   CryptoManager.NotInitializedException,
                   TokenException,
                   java.security.InvalidKeyException,
                   IOException