1#!/bin/bash 2 3# Start Intermediate CA's OCSP server 4openssl ocsp -index demoCA/index.txt -ndays 36500 -port 8080 -rsigner x509-interm-cert.pem -rkey x509-interm-key.pem -CA x509-interm-cert.pem -text & ocsp_server=$! 5 6# Save OCSP Stapled Response 7openssl ocsp -sha256 -CAfile x509-interm-cert.pem -issuer x509-interm-cert.pem -cert x509-server-cert.pem -url http://127.0.0.1:8080 -noverify -resp_text -respout ocsp_stapled_resp.der 8 9# Kill OCSP Server 10kill -9 $ocsp_server 11 12# == BIBLIOGRAPHY == 13# 1. https://medium.com/@bhashineen/create-your-own-ocsp-server-ffb212df8e63 14# 2. https://gitlab.com/gnuwget/wget/blob/master/tests/certs/create-certs.sh 15# 3. https://gitlab.com/gnuwget/wget2/blob/master/tests/certs/README 16