Package org.xipki.ocsp.client
Class AbstractOcspRequestor
- java.lang.Object
-
- org.xipki.ocsp.client.AbstractOcspRequestor
-
- All Implemented Interfaces:
OcspRequestor
- Direct Known Subclasses:
HttpOcspRequestor
public abstract class AbstractOcspRequestor extends Object implements OcspRequestor
Abstract class of OCSP requestor.- Since:
- 2.0.0
- Author:
- Lijun Liao (xipki)
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractOcspRequestor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.cert.ocsp.OCSPRespask(org.xipki.security.X509Cert issuerCert, BigInteger[] serialNumbers, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug)Asks for the status of the given certificates.org.bouncycastle.cert.ocsp.OCSPRespask(org.xipki.security.X509Cert issuerCert, BigInteger serialNumber, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug)Asks for the status of the given certificate.org.bouncycastle.cert.ocsp.OCSPRespask(org.xipki.security.X509Cert issuerCert, org.xipki.security.X509Cert[] certs, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug)Asks for the status of the given certificate.org.bouncycastle.cert.ocsp.OCSPRespask(org.xipki.security.X509Cert issuerCert, org.xipki.security.X509Cert cert, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug)Asks for the status of the given certificate.org.xipki.security.SecurityFactorygetSecurityFactory()StringgetSignerCertFile()StringgetSignerConf()StringgetSignerType()protected abstract byte[]send(byte[] request, URL responderUrl, RequestOptions requestOptions)Sends the request to the OCSP responder.voidsetSecurityFactory(org.xipki.security.SecurityFactory securityFactory)voidsetSignerCertFile(String signerCertFile)voidsetSignerConf(String signerConf)voidsetSignerType(String signerType)
-
-
-
Method Detail
-
send
protected abstract byte[] send(byte[] request, URL responderUrl, RequestOptions requestOptions) throws IOExceptionSends the request to the OCSP responder.- Parameters:
request- Request. Must not benull.responderUrl- Responder URL. Must not benull.requestOptions- Request options. Must not benull.- Returns:
- received response
- Throws:
IOException- if the transmission failed.
-
ask
public org.bouncycastle.cert.ocsp.OCSPResp ask(org.xipki.security.X509Cert issuerCert, org.xipki.security.X509Cert cert, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug) throws OcspResponseException, OcspRequestorExceptionDescription copied from interface:OcspRequestorAsks for the status of the given certificate.- Specified by:
askin interfaceOcspRequestor- Parameters:
issuerCert- Issuer certificate. Must not benull.cert- Target certificate. Must not benull.responderUrl- Responder URL. Must not benull.requestOptions- Request options. Must not benull.debug- Request/response debug control. Could benull.- Returns:
- the OCSP response.
- Throws:
OcspResponseException- if the OCSP responder cannot be reached or the response does not match the requested certificate.OcspRequestorException- if cannot build the OCSP request
-
ask
public org.bouncycastle.cert.ocsp.OCSPResp ask(org.xipki.security.X509Cert issuerCert, org.xipki.security.X509Cert[] certs, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug) throws OcspResponseException, OcspRequestorExceptionDescription copied from interface:OcspRequestorAsks for the status of the given certificate.- Specified by:
askin interfaceOcspRequestor- Parameters:
issuerCert- Issuer certificate. Must not benull.certs- Target certificates. Must not benull.responderUrl- Responder URL. Must not benull.requestOptions- Request options. Must not benull.debug- Request/response debug control. Could benull.- Returns:
- the OCSP response.
- Throws:
OcspResponseException- if the OCSP responder cannot be reached or the response does not match the requested certificate.OcspRequestorException- if cannot build the OCSP request
-
ask
public org.bouncycastle.cert.ocsp.OCSPResp ask(org.xipki.security.X509Cert issuerCert, BigInteger serialNumber, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug) throws OcspResponseException, OcspRequestorExceptionDescription copied from interface:OcspRequestorAsks for the status of the given certificate.- Specified by:
askin interfaceOcspRequestor- Parameters:
issuerCert- Issuer certificate. Must not benull.serialNumber- Serial number of the target certificate. Must not benull.responderUrl- Responder URL. Must not benull.requestOptions- Request options. Must not benull.debug- Request/response debug control. Could benull.- Returns:
- the OCSP response.
- Throws:
OcspResponseException- if the OCSP responder cannot be reached or the response does not match the requested certificate.OcspRequestorException- if cannot build the OCSP request
-
ask
public org.bouncycastle.cert.ocsp.OCSPResp ask(org.xipki.security.X509Cert issuerCert, BigInteger[] serialNumbers, URL responderUrl, RequestOptions requestOptions, org.xipki.util.ReqRespDebug debug) throws OcspResponseException, OcspRequestorExceptionDescription copied from interface:OcspRequestorAsks for the status of the given certificates.- Specified by:
askin interfaceOcspRequestor- Parameters:
issuerCert- Issuer certificate. Must not benull.serialNumbers- Serial numbers of the target certificates. Must not benull.responderUrl- Responder URL. Must not benull.requestOptions- Request options. Must not benull.debug- Request/response debug control. Could benull.- Returns:
- the OCSP response.
- Throws:
OcspResponseException- if the OCSP responder cannot be reached or the response does not match the requested certificates.OcspRequestorException- if cannot build the OCSP request
-
getSignerConf
public String getSignerConf()
-
setSignerConf
public void setSignerConf(String signerConf)
-
getSignerCertFile
public String getSignerCertFile()
-
setSignerCertFile
public void setSignerCertFile(String signerCertFile)
-
getSignerType
public String getSignerType()
-
setSignerType
public void setSignerType(String signerType)
-
getSecurityFactory
public org.xipki.security.SecurityFactory getSecurityFactory()
-
setSecurityFactory
public void setSecurityFactory(org.xipki.security.SecurityFactory securityFactory)
-
-