PKIX :: OCSP Client

Configurable OCSP client.

License

License

Categories

Categories

Net
GroupId

GroupId

net.klakegg.pkix
ArtifactId

ArtifactId

pkix-ocsp
Last Version

Last Version

0.9.1
Release Date

Release Date

Type

Type

jar
Description

Description

PKIX :: OCSP Client
Configurable OCSP client.
Project URL

Project URL

https://github.com/klakegg/pkix-ocsp
Source Code Management

Source Code Management

https://github.com/klakegg/pkix-ocsp

Download pkix-ocsp

How to add to project

<!-- https://jarcasting.com/artifacts/net.klakegg.pkix/pkix-ocsp/ -->
<dependency>
    <groupId>net.klakegg.pkix</groupId>
    <artifactId>pkix-ocsp</artifactId>
    <version>0.9.1</version>
</dependency>
// https://jarcasting.com/artifacts/net.klakegg.pkix/pkix-ocsp/
implementation 'net.klakegg.pkix:pkix-ocsp:0.9.1'
// https://jarcasting.com/artifacts/net.klakegg.pkix/pkix-ocsp/
implementation ("net.klakegg.pkix:pkix-ocsp:0.9.1")
'net.klakegg.pkix:pkix-ocsp:jar:0.9.1'
<dependency org="net.klakegg.pkix" name="pkix-ocsp" rev="0.9.1">
  <artifact name="pkix-ocsp" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.klakegg.pkix', module='pkix-ocsp', version='0.9.1')
)
libraryDependencies += "net.klakegg.pkix" % "pkix-ocsp" % "0.9.1"
[net.klakegg.pkix/pkix-ocsp "0.9.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.bouncycastle : bcpkix-jdk15on jar 1.57

provided (1)

Group / Artifact Type Version
org.apache.httpcomponents : httpclient jar 4.5.3

test (2)

Group / Artifact Type Version
org.testng : testng jar 6.10
org.mockito : mockito-core jar 2.8.47

Project Modules

There are no modules declared in this project.

OCSP Client

Build Status Codecov

Getting started

Include dependency in your pom.xml:

<dependency>
    <groupId>net.klakegg.pkix</groupId>
    <artifactId>pkix-ocsp</artifactId>
    <version>0.9.0</version>
</dependency>

Create your own validator:

// Create OCSP Client using builder.
OcspClient client = OcspClient.builder()
        .set(OcspClient.EXCEPTION_ON_UNKNOWN, false) // Remove to trigger exception on 'UNKNOWN'.
        .set(OcspClient.EXCEPTION_ON_REVOKED, false) // Remove to trigger exception on 'REVOKED'.
        .build();

// Verify certificate (issuer certificate required).
CertificateResult response = client.verify(certificate, issuer);

// Prints 'GOOD', 'REVOKED' or 'UNKNOWN'.
System.out.println(response.getStatus());

Versions

Version
0.9.1
0.9.0