Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@selivan
Forked from denji/OCSP-generate.sh
Last active February 17, 2018 18:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selivan/e15dccdd8efbb57e323564fa786c8921 to your computer and use it in GitHub Desktop.
Save selivan/e15dccdd8efbb57e323564fa786c8921 to your computer and use it in GitHub Desktop.
Priming the OCSP cache in Nginx
#!/bin/sh
ISSUER_CER=$1
SERVER_CER=$2
URL=$(openssl x509 -noout -ocsp_uri -in "$SERVER_CER")
openssl ocsp -noverify -no_nonce -respout ocsp.resp -issuer "$ISSUER_CER" -cert "$SERVER_CER" -url "$URL"
# Where “ocsp.resp” is whatever file you have configured in Nginx for the “ssl_stapling_file“.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment