Class OCSPReq

java.lang.Object
org.bouncycastle.cert.ocsp.OCSPReq

public class OCSPReq extends Object
 OCSPRequest     ::=     SEQUENCE {
       tbsRequest                  TBSRequest,
       optionalSignature   [0]     EXPLICIT Signature OPTIONAL }

   TBSRequest      ::=     SEQUENCE {
       version             [0]     EXPLICIT Version DEFAULT v1,
       requestorName       [1]     EXPLICIT GeneralName OPTIONAL,
       requestList                 SEQUENCE OF Request,
       requestExtensions   [2]     EXPLICIT Extensions OPTIONAL }

   Signature       ::=     SEQUENCE {
       signatureAlgorithm      AlgorithmIdentifier,
       signature               BIT STRING,
       certs               [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL}

   Version         ::=             INTEGER  {  v1(0) }

   Request         ::=     SEQUENCE {
       reqCert                     CertID,
       singleRequestExtensions     [0] EXPLICIT Extensions OPTIONAL }

   CertID          ::=     SEQUENCE {
       hashAlgorithm       AlgorithmIdentifier,
       issuerNameHash      OCTET STRING, -- Hash of Issuer's DN
       issuerKeyHash       OCTET STRING, -- Hash of Issuers public key
       serialNumber        CertificateSerialNumber }
 
  • Constructor Details Link icon

    • OCSPReq Link icon

      public OCSPReq(org.bouncycastle.asn1.ocsp.OCSPRequest req)
    • OCSPReq Link icon

      public OCSPReq(byte[] req) throws IOException
      Throws:
      IOException
  • Method Details Link icon

    • getVersionNumber Link icon

      public int getVersionNumber()
    • getRequestorName Link icon

      public org.bouncycastle.asn1.x509.GeneralName getRequestorName()
    • getRequestList Link icon

      public Req[] getRequestList()
    • hasExtensions Link icon

      public boolean hasExtensions()
    • getExtension Link icon

      public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
    • getExtensionOIDs Link icon

      public List getExtensionOIDs()
    • getCriticalExtensionOIDs Link icon

      public Set getCriticalExtensionOIDs()
    • getNonCriticalExtensionOIDs Link icon

      public Set getNonCriticalExtensionOIDs()
    • getSignatureAlgOID Link icon

      public org.bouncycastle.asn1.ASN1ObjectIdentifier getSignatureAlgOID()
      return the object identifier representing the signature algorithm
    • getSignature Link icon

      public byte[] getSignature()
    • getCerts Link icon

      public X509CertificateHolder[] getCerts()
    • isSigned Link icon

      public boolean isSigned()
      Return whether or not this request is signed.
      Returns:
      true if signed false otherwise.
    • isSignatureValid Link icon

      public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OCSPException
      verify the signature against the TBSRequest object we contain.
      Throws:
      OCSPException
    • getEncoded Link icon

      public byte[] getEncoded() throws IOException
      return the ASN.1 encoded representation of this object.
      Throws:
      IOException