2023-12-24 06:03:21 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-10 04:43:49 +08:00
|
|
|
# Example querying OpenSSL test responder. Assumes ocsprun.sh has been
|
|
|
|
# called.
|
|
|
|
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd() {
|
|
|
|
LD_LIBRARY_PATH=../.. ../../apps/openssl $@
|
|
|
|
}
|
|
|
|
|
2012-09-10 04:43:49 +08:00
|
|
|
OPENSSL_CONF=../../apps/openssl.cnf
|
|
|
|
export OPENSSL_CONF
|
|
|
|
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd version
|
|
|
|
|
2012-09-10 04:43:49 +08:00
|
|
|
# Send responder queries for each certificate.
|
|
|
|
|
|
|
|
echo "Requesting OCSP status for each certificate"
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd ocsp -issuer intca.pem -cert client.pem -CAfile root.pem \
|
2012-09-10 04:43:49 +08:00
|
|
|
-url http://127.0.0.1:8888/
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd ocsp -issuer intca.pem -cert server.pem -CAfile root.pem \
|
2012-09-10 04:43:49 +08:00
|
|
|
-url http://127.0.0.1:8888/
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd ocsp -issuer intca.pem -cert rev.pem -CAfile root.pem \
|
2012-09-10 04:43:49 +08:00
|
|
|
-url http://127.0.0.1:8888/
|
|
|
|
# One query for all three certificates.
|
|
|
|
echo "Requesting OCSP status for three certificates in one request"
|
2023-12-24 06:03:21 +08:00
|
|
|
opensslcmd ocsp -issuer intca.pem \
|
2012-09-10 04:43:49 +08:00
|
|
|
-cert client.pem -cert server.pem -cert rev.pem \
|
|
|
|
-CAfile root.pem -url http://127.0.0.1:8888/
|