Skip to content

Instantly share code, notes, and snippets.

@vanbroup
Last active March 15, 2021 13:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vanbroup/52c4d742cea3deaed245f1669525f68b to your computer and use it in GitHub Desktop.
Save vanbroup/52c4d742cea3deaed245f1669525f68b to your computer and use it in GitHub Desktop.
Making an OCSP request with OpenSSL using the issuer certificate and serial number and replay it with CURL for debugging
# Make an OCSP request with CURL using the issuer certificate and serial number
openssl ocsp -noverify -no_nonce -respout ocsp.resp -reqout ocsp.req -issuer issuer.pem -serial "0x11219f92c6b10baba606ac6c7eb0474898f6" -text -url http://ocsp.example.com -header 'Host=ocsp.example.com'
# Replay the OCSP request via CURL showing request and response headers for debugggin
curl -v -o curl.resp --data-binary @ocsp.req -H "Content-Type: application/ocsp-request" --url http://ocsp.example.com/ca1 --header "Host=ocsp.example.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment