# single-ocsp/test
This directory has a complete test of the single OCSP response generator utility packaged with boulder. A successful test run looks like the following:
```
$ make test
go build -tags pkcs11 ..
go run -tags pkcs11 gentest.go
openssl verify -CAfile ca-cert.pem ee-cert.pem
ee-cert.pem: OK
openssl verify -CAfile ca-cert.pem ocsp-cert.pem
ocsp-cert.pem: OK
./single-ocsp -issuer ca-cert.der \
-responder ocsp-cert.der \
-target ee-cert.der \
-template template-good.json \
-pkcs11 pkcs11.json \
-out ocsp-good.der
./single-ocsp -issuer ca-cert.der \
-responder ocsp-cert.der \
-target ee-cert.der \
-template template-revoked.json \
-pkcs11 pkcs11.json \
-out ocsp-revoked.der
openssl ocsp -respin ocsp-good.der -CAfile ca-cert.pem -resp_text | grep "Cert Status"
Response verify OK
Cert Status: good
openssl ocsp -respin ocsp-revoked.der -CAfile ca-cert.pem -resp_text | grep "Cert Status"
Response verify OK
Cert Status: revoked
```
This test is not run as part of the boulder test suite because it requires a PKCS#11-backed key.