Package org.bouncycastle.cert.ocsp
Class OCSPReq
- java.lang.Object
-
- org.bouncycastle.cert.ocsp.OCSPReq
-
public class OCSPReq extends java.lang.ObjectOCSPRequest ::= 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 }
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description X509CertificateHolder[]getCerts()java.util.SetgetCriticalExtensionOIDs()byte[]getEncoded()return the ASN.1 encoded representation of this object.org.bouncycastle.asn1.x509.ExtensiongetExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)java.util.ListgetExtensionOIDs()java.util.SetgetNonCriticalExtensionOIDs()Req[]getRequestList()org.bouncycastle.asn1.x509.GeneralNamegetRequestorName()byte[]getSignature()org.bouncycastle.asn1.ASN1ObjectIdentifiergetSignatureAlgOID()return the object identifier representing the signature algorithmintgetVersionNumber()booleanhasExtensions()booleanisSignatureValid(ContentVerifierProvider verifierProvider)verify the signature against the TBSRequest object we contain.booleanisSigned()Return whether or not this request is signed.
-
-
-
Method Detail
-
getVersionNumber
public int getVersionNumber()
-
getRequestorName
public org.bouncycastle.asn1.x509.GeneralName getRequestorName()
-
getRequestList
public Req[] getRequestList()
-
hasExtensions
public boolean hasExtensions()
-
getExtension
public org.bouncycastle.asn1.x509.Extension getExtension(org.bouncycastle.asn1.ASN1ObjectIdentifier oid)
-
getExtensionOIDs
public java.util.List getExtensionOIDs()
-
getCriticalExtensionOIDs
public java.util.Set getCriticalExtensionOIDs()
-
getNonCriticalExtensionOIDs
public java.util.Set getNonCriticalExtensionOIDs()
-
getSignatureAlgOID
public org.bouncycastle.asn1.ASN1ObjectIdentifier getSignatureAlgOID()
return the object identifier representing the signature algorithm
-
getSignature
public byte[] getSignature()
-
getCerts
public X509CertificateHolder[] getCerts()
-
isSigned
public boolean isSigned()
Return whether or not this request is signed.- Returns:
- true if signed false otherwise.
-
isSignatureValid
public boolean isSignatureValid(ContentVerifierProvider verifierProvider) throws OCSPException
verify the signature against the TBSRequest object we contain.- Throws:
OCSPException
-
getEncoded
public byte[] getEncoded() throws java.io.IOExceptionreturn the ASN.1 encoded representation of this object.- Throws:
java.io.IOException
-
-