Class CertReqMsg

  • All Implemented Interfaces:
    ASN1Value

    public class CertReqMsg
    extends java.lang.Object
    implements ASN1Value
    This class models a CRMF CertReqMsg structure.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  CertReqMsg.Template
      A class for decoding CertReqMsg structures from a BER encoding.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static Tag TAG  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void encode​(java.io.OutputStream ostream)
      Encodes this CertReqMsg to the given OutputStream using DER encoding.
      void encode​(Tag implicit, java.io.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​(java.lang.String[] args)  
      void verify()  
      void verify​(CryptoToken token)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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: ASN1Value
        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
        Returns:
        Base tag.
      • getCertReq

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

        public boolean hasRegInfo()
        Returns true if 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()
        Returns true if this CertReqMsg has a pop field.
      • getPop

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

        public void encode​(java.io.OutputStream ostream)
                    throws java.io.IOException
        Encodes this CertReqMsg to the given OutputStream using DER encoding.
        Specified by:
        encode in interface ASN1Value
        Parameters:
        ostream - Output stream.
        Throws:
        java.io.IOException - If an error occurred.
      • 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.
        Specified by:
        encode in interface ASN1Value
        Parameters:
        implicit - Implicit tag.
        ostream - Output stream.
        Throws:
        java.io.IOException - If an error occurred.
      • main

        public static void main​(java.lang.String[] args)