https://github.com/klakegg/pkix-ocsp
https://github.com/klakegg/pkix-ocsp
ocsp pki pkix
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/klakegg/pkix-ocsp
- Owner: klakegg
- License: mpl-2.0
- Created: 2017-08-02T12:35:51.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2021-09-06T13:17:17.000Z (about 4 years ago)
- Last Synced: 2023-07-27T15:55:40.022Z (over 2 years ago)
- Topics: ocsp, pki, pkix
- Language: Java
- Size: 66.4 KB
- Stars: 5
- Watchers: 1
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# OCSP Client
[](https://travis-ci.org/klakegg/pkix-ocsp)
[](https://codecov.io/gh/klakegg/pkix-ocsp)
## Getting started
Include dependency in your pom.xml:
```xml
net.klakegg.pkix
pkix-ocsp
0.9.0
```
Create your own validator:
```java
// 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());
```