|
Bouncy Castle Cryptography Library 1.37 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.bouncycastle.ocsp.OCSPReq
public class OCSPReq
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 Summary | |
---|---|
OCSPReq(byte[] req)
|
|
OCSPReq(java.io.InputStream in)
|
|
OCSPReq(OCSPRequest req)
|
Method Summary | |
---|---|
java.security.cert.CertStore |
getCertificates(java.lang.String type,
java.lang.String provider)
If the request is signed return a possibly empty CertStore containing the certificates in the request. |
java.security.cert.X509Certificate[] |
getCerts(java.lang.String provider)
|
java.util.Set |
getCriticalExtensionOIDs()
|
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object. |
byte[] |
getExtensionValue(java.lang.String oid)
|
java.util.Set |
getNonCriticalExtensionOIDs()
|
X509Extensions |
getRequestExtensions()
|
Req[] |
getRequestList()
|
GeneralName |
getRequestorName()
|
byte[] |
getSignature()
|
java.lang.String |
getSignatureAlgOID()
return the object identifier representing the signature algorithm |
byte[] |
getTBSRequest()
Return the DER encoding of the tbsRequest field. |
int |
getVersion()
|
boolean |
hasUnsupportedCriticalExtension()
RFC 2650 doesn't specify any critical extensions so we return true if any are encountered. |
boolean |
isSigned()
Return whether or not this request is signed. |
boolean |
verify(java.security.PublicKey key,
java.lang.String sigProvider)
verify the signature against the TBSRequest object we contain. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OCSPReq(OCSPRequest req)
public OCSPReq(byte[] req) throws java.io.IOException
java.io.IOException
public OCSPReq(java.io.InputStream in) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public byte[] getTBSRequest() throws OCSPException
OCSPException
- in the event of an encoding error.public int getVersion()
public GeneralName getRequestorName()
public Req[] getRequestList()
public X509Extensions getRequestExtensions()
public java.lang.String getSignatureAlgOID()
public byte[] getSignature()
public java.security.cert.X509Certificate[] getCerts(java.lang.String provider) throws OCSPException, java.security.NoSuchProviderException
OCSPException
java.security.NoSuchProviderException
public java.security.cert.CertStore getCertificates(java.lang.String type, java.lang.String provider) throws java.security.NoSuchAlgorithmException, java.security.NoSuchProviderException, OCSPException
type
- type of CertStore to returnprovider
- provider to use
java.security.NoSuchAlgorithmException
java.security.NoSuchProviderException
OCSPException
public boolean isSigned()
public boolean verify(java.security.PublicKey key, java.lang.String sigProvider) throws OCSPException, java.security.NoSuchProviderException
OCSPException
java.security.NoSuchProviderException
public byte[] getEncoded() throws java.io.IOException
java.io.IOException
public boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension
in interface java.security.cert.X509Extension
public java.util.Set getCriticalExtensionOIDs()
getCriticalExtensionOIDs
in interface java.security.cert.X509Extension
public java.util.Set getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs
in interface java.security.cert.X509Extension
public byte[] getExtensionValue(java.lang.String oid)
getExtensionValue
in interface java.security.cert.X509Extension
|
Bouncy Castle Cryptography Library 1.37 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |