Automatically generated by Pod::Man 4.09 (Pod::Simple 3.35) Standard preamble: ========================================================================
NAMEocsp - Online Certificate Status Protocol utility
SYNOPSISopenssl ocsp [-out file] [-issuer file] [-cert file] [-serial n] [-signer file] [-signkey file] [-sign_other file] [-no_certs] [-req_text] [-resp_text] [-text] [-reqout file] [-respout file] [-reqin file] [-respin file] [-nonce] [-no_nonce] [-url
DESCRIPTIONThe Online Certificate Status Protocol (
The ocsp command performs many common
OCSP CLIENT OPTIONS
- -out filename
- specify output filename, default is standard output.
- -issuer filename
This specifies the current issuer certificate. This option can be used
multiple times. The certificate specified in filename must be in
PEMformat. This optionMUSTcome before any -cert options.
- -cert filename
- Add the certificate filename to the request. The issuer certificate is taken from the previous issuer option, or an error occurs if no issuer certificate is specified.
- -serial num
- Same as the cert option except the certificate with serial number num is added to the request. The serial number is interpreted as a decimal integer unless preceded by 0x. Negative integers can also be specified by preceding the value by a - sign.
- -signer filename, -signkey filename
Sign the OCSPrequest using the certificate specified in the signer option and the private key specified by the signkey option. If the signkey option is not present then the private key is read from the same file as the certificate. If neither option is specified then theOCSPrequest is not signed.
- -sign_other filename
- Additional certificates to include in the signed request.
- -nonce, -no_nonce
Add an OCSPnonce extension to a request or disableOCSPnonce addition. Normally if anOCSPrequest is input using the respin option no nonce is added: using the nonce option will force addition of a nonce. If anOCSPrequest is being created (using cert and serial options) a nonce is automatically added specifying no_nonce overrides this.
- -req_text, -resp_text, -text
print out the text form of the OCSPrequest, response or both respectively.
- -reqout file, -respout file
write out the DERencoded certificate request or response to file.
- -reqin file, -respin file
read OCSPrequest or response file from file. These option are ignored ifOCSPrequest or response creation is implied by other options (for example with serial, cert and host options).
- -url responder_url
specify the responder URL.BothHTTPandHTTPS(SSL/TLS) URLs can be specified.
- -host hostname:port, -path pathname
if the host option is present then the OCSPrequest is sent to the host hostname on port port. path specifies theHTTPpath name to use or ``/'' by default.
- -timeout seconds
connection timeout to the OCSPresponder in seconds
- -CAfile file, -CApath pathname
file or pathname containing trusted CAcertificates. These are used to verify the signature on theOCSPresponse.
- See verify manual page for details.
- -verify_other file
file containing additional certificates to search when attempting to locate
the OCSPresponse signing certificate. Some responders omit the actual signer's certificate from the response: this option can be used to supply the necessary certificate in such cases.
the certificates specified by the -verify_other option should be explicitly
trusted and no additional checks will be performed on them. This is useful
when the complete responder certificate chain is not available or trusting a
root CAis not appropriate.
- -VAfile file
- file containing explicitly trusted responder certificates. Equivalent to the -verify_other and -trust_other options.
don't attempt to verify the OCSPresponse signature or the nonce values. This option will normally only be used for debugging since it disables all verification of the responders certificate.
ignore certificates contained in the OCSPresponse when searching for the signers certificate. With this option the signers certificate must be specified with either the -verify_other or -VAfile options.
don't check the signature on the OCSPresponse. Since this option tolerates invalid signatures onOCSPresponses it will normally only be used for testing purposes.
don't verify the OCSPresponse signers certificate at all. Since this option allows theOCSPresponse to be signed by any certificate it should only be used for testing purposes.
do not use certificates in the response as additional untrusted CAcertificates.
do not explicitly trust the root CAif it is set to be trusted forOCSPsigning.
don't perform any additional checks on the OCSPresponse signers certificate. That is do not make any checks to see if the signers certificate is authorised to provide the necessary status information: as a result this option should only be used for testing purposes.
- -validity_period nsec, -status_age age
these options specify the range of times, in seconds, which will be tolerated
in an OCSPresponse. Each certificate status response includes a notBefore time and an optional notAfter time. The current time should fall between these two values, but the interval between the two times may be only a few seconds. In practice theOCSPresponder and clients clocks may not be precisely synchronised and so such a check may fail. To avoid this the -validity_period option can be used to specify an acceptable error range in seconds, the default value is 5 minutes.
If the notAfter time is omitted from a response then this means that new status information is immediately available. In this case the age of the notBefore field is checked to see it is not older than age seconds old. By default this additional check is not performed.
this option sets digest algorithm to use for certificate identification
in the OCSPrequest. By defaultSHA-1is used.
OCSP SERVER OPTIONS
- -index indexfile
indexfile is a text index file in ca format containing certificate revocation
If the index option is specified the ocsp utility is in responder mode, otherwise it is in client mode. The request(s) the responder processes can be either specified on the command line (using issuer and serial options), supplied in a file (using the respin option) or via externalOCSPclients (if port or url is specified).
If the index option is present then theCAand rsigner options must also be present.
- -CA file
CAcertificate corresponding to the revocation information in indexfile.
- -rsigner file
The certificate to sign OCSPresponses with.
- -rother file
Additional certificates to include in the OCSPresponse.
Don't include any certificates in the OCSPresponse.
Identify the signer certificate using the key ID,default is to use the subject name.
- -rkey file
The private key to sign OCSPresponses with: if not present the file specified in the rsigner option is used.
- -port portnum
Port to listen for OCSPrequests on. The port may also be specified using the url option.
- -nrequest number
The OCSPserver will exit after receiving number requests, default unlimited.
- -nmin minutes, -ndays days
- Number of minutes or days when fresh revocation information is available: used in the nextUpdate field. If neither option is present then the nextUpdate field is omitted meaning fresh revocation information is immediately available.
OCSP Response verification.
Then a normal certificate verify is performed on the
If the initial verify fails then the
Otherwise the issuing
Otherwise, if -no_explicit is not set the root
If none of these checks is successful then the
What this effectively means if that if the
openssl x509 -in ocspCA.pem -addtrust OCSPSigning -out trustedCA.pem
Alternatively the responder certificate itself can be explicitly trusted with the -VAfile option.
NOTESAs noted, most of the verify options are for testing or debugging purposes. Normally only the -CApath, -CAfile and (if the responder is a 'global
It is possible to run the ocsp application in responder mode via a
openssl ocsp -issuer issuer.pem -cert c1.pem -cert c2.pem -reqout req.der
Send a query to an
openssl ocsp -issuer issuer.pem -cert c1.pem -cert c2.pem \ -url ocsp.myhost.com -resp_text -respout resp.der
Read in an
openssl ocsp -respin resp.der -text
openssl ocsp -index demoCA/index.txt -port 8888 -rsigner rcert.pem -CA demoCA/cacert.pem -text -out log.txt
As above but exit after processing one request:
openssl ocsp -index demoCA/index.txt -port 8888 -rsigner rcert.pem -CA demoCA/cacert.pem -nrequest 1
Query status information using internally generated request:
openssl ocsp -index demoCA/index.txt -rsigner rcert.pem -CA demoCA/cacert.pem -issuer demoCA/cacert.pem -serial 1
Query status information using request read from a file, write response to a second file.
openssl ocsp -index demoCA/index.txt -rsigner rcert.pem -CA demoCA/cacert.pem -reqin req.der -respout resp.der