+
+ # convert one good leaf-resp to PEM
+ server=server1
+ RESP=$idir/$server.$iname/$server.$iname.ocsp.signernocert.good.resp
+ ocsptool -S $RESP -j > $RESP.pem
+
+ # Then, ocsp request and (valid, revoked) responses for the signer cert
+ REQ=$CADIR/Signer.ocsp.req
+ RESP=$CADIR/Signer.ocsp.signernocert.good.resp
+ openssl ocsp -issuer $CADIR/CA.pem -sha256 -cert $CADIR/Signer.pem -no_nonce -reqout $REQ
+ openssl ocsp $IVALID -rsigner $CADIR/CA.pem -rkey $CADIR/CA.key -CA $CADIR/CA.pem -resp_no_certs -noverify \
+ -ndays 3652 -reqin $REQ -respout $RESP
+ ocsptool -S $RESP -j > $RESP.pem
+
+ RESP=$CADIR/Signer.ocsp.signernocert.revoked.resp
+ openssl ocsp $IREVOKED -rsigner $CADIR/CA.pem -rkey $CADIR/CA.key -CA $CADIR/CA.pem -resp_no_certs -noverify \
+ -ndays 3652 -reqin $REQ -respout $RESP
+ ocsptool -S $RESP -j > $RESP.pem
+
+ # Finally, a full-chain all-good request and response
+ REQ=$idir/$server.$iname/fullchain.ocsp.req
+ leafcert=$idir/$server.$iname/$server.$iname.pem
+ signercert=$CADIR/Signer.pem
+ cacert=$CADIR/CA.pem
+ openssl ocsp -sha256 -no_nonce -reqout $REQ \
+ -issuer $signercert -cert $leafcert \
+ -issuer $cacert -cert $CADIR/Signer.pem -cert $CADIR/CA.pem
+
+ RESP=$idir/$server.$iname/fullchain.ocsp.resp
+ authorities=$idir/$server.$iname/ca_chain.pem
+ openssl ocsp $IVALID -rsigner $CADIR/CA.pem -rkey $CADIR/CA.key -CA $authorities -resp_no_certs -noverify \
+ -ndays 3652 -reqin $REQ -respout $RESP
+ ocsptool -S $RESP -j > $RESP.pem
+
+####