This is a sample java application for demonstrating OCSP validation using an Http client to send the request.
The repo includes gradle wrapper. To trigger a build and run, simply run:
$ gradlew run
Sample output:
> Task :run
OCSP url is: http://ocsp.r2m02.amazontrust.com
Full url for OCSP request is: http://ocsp.r2m02.amazontrust.com/MHIwc...Rg2Q=
OCSP response (Base64 encoded) is: MIIB0woBA...L5jT
OCSP response status is: SUCCESSFUL
Status of OCSP validation is: true
BUILD SUCCESSFUL in 3s
3 actionable tasks: 3 executed
Update com.capitaltg.demo.ocsp.OcspApplication to change any of the cert, CA (issuer) cert, OCSP endpoint, or whether nonce is used. Certificates are included in the repo in src/main/resources/.