Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

digipost/pkix-ocsp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkix-ocsp Master Build Maven Central

OCSP Client

Getting started

Include dependency in your pom.xml:

<dependency>
    <groupId>network.oxalis.pkix</groupId>
    <artifactId>pkix-ocsp</artifactId>
    <version>1.0.1</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());

Note

This implementation is based on Original version from klakegg / pkix-ocsp version 0.9.1 (https://github.com/klakegg/pkix-ocsp)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%