Package network.oxalis.pkix.ocsp
Class OcspMultiClient
- java.lang.Object
-
- network.oxalis.pkix.ocsp.OcspMultiClient
-
public class OcspMultiClient extends Object
Implementation of OCSP client supporting verification of multiple certificates at once using multiple requests in the OCSP request. This implementation requires intermediates to be set using the builder.- Author:
- erlend
-
-
Field Summary
Fields Modifier and Type Field Description static Property<Boolean>EXCEPTION_ON_NO_PATHstatic Property<OcspFetcher>FETCHERstatic Property<List<X509Certificate>>INTERMEDIATESstatic Property<Boolean>NONCEstatic Property<URI>OVERRIDE_URLprotected PropertiespropertiesProperties provided by the builder.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Builder<OcspMultiClient>builder()Builder to create an instance of the client.protected URIdetectOcspUri(X509Certificate certificate)protected network.oxalis.pkix.ocsp.OcspResponsefetch(network.oxalis.pkix.ocsp.OcspRequest ocspReq, URI uri)protected X509CertificatefindIntermediate(X509Certificate certificate)Method for finding issuer by provided issuers in properties given an issued certificate.OcspResultverify(URI uri, CertificateIssuer issuer, BigInteger... serialNumbers)OcspResultverify(X509Certificate... certificates)OcspResultverify(CertificateIssuer issuer, X509Certificate... certificates)
-
-
-
Field Detail
-
FETCHER
public static final Property<OcspFetcher> FETCHER
-
INTERMEDIATES
public static final Property<List<X509Certificate>> INTERMEDIATES
-
properties
protected final Properties properties
Properties provided by the builder.
-
-
Method Detail
-
builder
public static Builder<OcspMultiClient> builder()
Builder to create an instance of the client.- Returns:
- Prepared client.
-
verify
public OcspResult verify(X509Certificate... certificates) throws OcspException
- Throws:
OcspException
-
verify
public OcspResult verify(CertificateIssuer issuer, X509Certificate... certificates) throws OcspException
- Throws:
OcspException
-
verify
public OcspResult verify(URI uri, CertificateIssuer issuer, BigInteger... serialNumbers) throws OcspException
- Throws:
OcspException
-
findIntermediate
protected X509Certificate findIntermediate(X509Certificate certificate) throws OcspException
Method for finding issuer by provided issuers in properties given an issued certificate.- Parameters:
certificate- Issued certificate.- Returns:
- Issuer of the issued certificate.
- Throws:
OcspException- Thrown when no issuer is found.
-
detectOcspUri
protected URI detectOcspUri(X509Certificate certificate) throws OcspException
- Throws:
OcspException
-
fetch
protected network.oxalis.pkix.ocsp.OcspResponse fetch(network.oxalis.pkix.ocsp.OcspRequest ocspReq, URI uri) throws OcspException- Throws:
OcspException
-
-