xref: /freebsd/crypto/openssl/demos/certs/ocspquery.sh (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1# Example querying OpenSSL test responder. Assumes ocsprun.sh has been
2# called.
3
4OPENSSL=../../apps/openssl
5OPENSSL_CONF=../../apps/openssl.cnf
6export OPENSSL_CONF
7
8# Send responder queries for each certificate.
9
10echo "Requesting OCSP status for each certificate"
11$OPENSSL ocsp -issuer intca.pem -cert client.pem -CAfile root.pem \
12			-url http://127.0.0.1:8888/
13$OPENSSL ocsp -issuer intca.pem -cert server.pem -CAfile root.pem \
14			-url http://127.0.0.1:8888/
15$OPENSSL ocsp -issuer intca.pem -cert rev.pem -CAfile root.pem \
16			-url http://127.0.0.1:8888/
17# One query for all three certificates.
18echo "Requesting OCSP status for three certificates in one request"
19$OPENSSL ocsp -issuer intca.pem \
20	-cert client.pem -cert server.pem -cert rev.pem \
21	-CAfile root.pem -url http://127.0.0.1:8888/
22