public class BasicOCSPResp extends Object implements X509Extension
BasicOCSPResponse ::= SEQUENCE { tbsResponseData ResponseData, signatureAlgorithm AlgorithmIdentifier, signature BIT STRING, certs [0] EXPLICIT SEQUENCE OF Certificate OPTIONAL }
Constructor and Description |
---|
BasicOCSPResp(BasicOCSPResponse resp) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
CertStore |
getCertificates(String type,
String provider)
Return the certificates, if any associated with the response.
|
X509Certificate[] |
getCerts(String provider) |
Set |
getCriticalExtensionOIDs() |
byte[] |
getEncoded()
return the ASN.1 encoded representation of this object.
|
byte[] |
getExtensionValue(String oid) |
Set |
getNonCriticalExtensionOIDs() |
Date |
getProducedAt() |
RespID |
getResponderId() |
RespData |
getResponseData()
Deprecated.
RespData class is no longer required as all functionality is
available on this class.
|
X509Extensions |
getResponseExtensions() |
SingleResp[] |
getResponses() |
byte[] |
getSignature() |
String |
getSignatureAlgName() |
String |
getSignatureAlgOID() |
byte[] |
getTBSResponseData()
Return the DER encoding of the tbsResponseData field.
|
int |
getVersion() |
int |
hashCode() |
boolean |
hasUnsupportedCriticalExtension()
RFC 2650 doesn't specify any critical extensions so we return true
if any are encountered.
|
boolean |
verify(PublicKey key,
String sigProvider)
verify the signature against the tbsResponseData object we contain.
|
public BasicOCSPResp(BasicOCSPResponse resp)
public byte[] getTBSResponseData() throws OCSPException
OCSPException
- in the event of an encoding error.public int getVersion()
public RespID getResponderId()
public Date getProducedAt()
public SingleResp[] getResponses()
public X509Extensions getResponseExtensions()
public boolean hasUnsupportedCriticalExtension()
hasUnsupportedCriticalExtension
in interface X509Extension
public Set getCriticalExtensionOIDs()
getCriticalExtensionOIDs
in interface X509Extension
public Set getNonCriticalExtensionOIDs()
getNonCriticalExtensionOIDs
in interface X509Extension
public byte[] getExtensionValue(String oid)
getExtensionValue
in interface X509Extension
public String getSignatureAlgName()
public String getSignatureAlgOID()
public RespData getResponseData()
public byte[] getSignature()
public X509Certificate[] getCerts(String provider) throws OCSPException, NoSuchProviderException
OCSPException
NoSuchProviderException
public CertStore getCertificates(String type, String provider) throws NoSuchAlgorithmException, NoSuchProviderException, OCSPException
type
- type of CertStore to createprovider
- provider to useNoSuchAlgorithmException
NoSuchProviderException
OCSPException
public boolean verify(PublicKey key, String sigProvider) throws OCSPException, NoSuchProviderException
OCSPException
NoSuchProviderException
public byte[] getEncoded() throws IOException
IOException
Copyright © 2015. All rights reserved.