summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjmc <>2016-08-19 08:46:38 +0000
committerjmc <>2016-08-19 08:46:38 +0000
commit30130a14f634515f0b4570796ab55bf107fd2ad9 (patch)
tree479f007e62b94903dfd2d891e5f97a1f26a82647 /src
parent1106933c5e1655871fb87ad0efed63240d2c4997 (diff)
downloadopenbsd-30130a14f634515f0b4570796ab55bf107fd2ad9.tar.gz
openbsd-30130a14f634515f0b4570796ab55bf107fd2ad9.tar.bz2
openbsd-30130a14f634515f0b4570796ab55bf107fd2ad9.zip
shorten the ocsp text; ok beck
Diffstat (limited to 'src')
-rw-r--r--src/usr.bin/openssl/openssl.1270
1 files changed, 71 insertions, 199 deletions
diff --git a/src/usr.bin/openssl/openssl.1 b/src/usr.bin/openssl/openssl.1
index fafee79a98..f583758cb8 100644
--- a/src/usr.bin/openssl/openssl.1
+++ b/src/usr.bin/openssl/openssl.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: openssl.1,v 1.54 2016/08/18 12:07:21 jmc Exp $ 1.\" $OpenBSD: openssl.1,v 1.55 2016/08/19 08:46:38 jmc Exp $
2.\" ==================================================================== 2.\" ====================================================================
3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved. 3.\" Copyright (c) 1998-2002 The OpenSSL Project. All rights reserved.
4.\" 4.\"
@@ -112,7 +112,7 @@
112.\" 112.\"
113.\" OPENSSL 113.\" OPENSSL
114.\" 114.\"
115.Dd $Mdocdate: August 18 2016 $ 115.Dd $Mdocdate: August 19 2016 $
116.Dt OPENSSL 1 116.Dt OPENSSL 1
117.Os 117.Os
118.Sh NAME 118.Sh NAME
@@ -2076,22 +2076,15 @@ With the
2076option the situation is reversed: 2076option the situation is reversed:
2077a Netscape certificate sequence is created from a file of certificates. 2077a Netscape certificate sequence is created from a file of certificates.
2078.El 2078.El
2079.\"
2080.\" OCSP
2081.\"
2082.Sh OCSP 2079.Sh OCSP
2083.nr nS 1 2080.nr nS 1
2084.Nm "openssl ocsp" 2081.Nm "openssl ocsp"
2085.Bk -words
2086.Op Fl CA Ar file 2082.Op Fl CA Ar file
2087.Op Fl CAfile Ar file 2083.Op Fl CAfile Ar file
2088.Op Fl CApath Ar directory 2084.Op Fl CApath Ar directory
2089.Op Fl cert Ar file 2085.Op Fl cert Ar file
2090.Op Fl dgst Ar alg 2086.Op Fl dgst Ar alg
2091.Oo 2087.Op Fl host Ar hostname : Ns Ar port
2092.Fl host
2093.Ar hostname : Ns Ar port
2094.Oc
2095.Op Fl index Ar indexfile 2088.Op Fl index Ar indexfile
2096.Op Fl issuer Ar file 2089.Op Fl issuer Ar file
2097.Op Fl ndays Ar days 2090.Op Fl ndays Ar days
@@ -2131,15 +2124,11 @@ a Netscape certificate sequence is created from a file of certificates.
2131.Op Fl VAfile Ar file 2124.Op Fl VAfile Ar file
2132.Op Fl validity_period Ar nsec 2125.Op Fl validity_period Ar nsec
2133.Op Fl verify_other Ar file 2126.Op Fl verify_other Ar file
2134.Ek
2135.nr nS 0 2127.nr nS 0
2136.Pp 2128.Pp
2137The Online Certificate Status Protocol 2129The Online Certificate Status Protocol (OCSP)
2138.Pq OCSP 2130enables applications to determine the (revocation) state
2139enables applications to determine the 2131of an identified certificate (RFC 2560).
2140.Pq revocation
2141state of an identified certificate
2142.Pq RFC 2560 .
2143.Pp 2132.Pp
2144The 2133The
2145.Nm ocsp 2134.Nm ocsp
@@ -2151,11 +2140,8 @@ and behave like a mini OCSP server itself.
2151The options are as follows: 2140The options are as follows:
2152.Bl -tag -width Ds 2141.Bl -tag -width Ds
2153.It Fl CAfile Ar file , Fl CApath Ar directory 2142.It Fl CAfile Ar file , Fl CApath Ar directory
2154.Ar file 2143A file or path containing trusted CA certificates,
2155or 2144used to verify the signature on the OCSP response.
2156.Ar path
2157containing trusted CA certificates.
2158These are used to verify the signature on the OCSP response.
2159.It Fl cert Ar file 2145.It Fl cert Ar file
2160Add the certificate 2146Add the certificate
2161.Ar file 2147.Ar file
@@ -2164,32 +2150,28 @@ The issuer certificate is taken from the previous
2164.Fl issuer 2150.Fl issuer
2165option, or an error occurs if no issuer certificate is specified. 2151option, or an error occurs if no issuer certificate is specified.
2166.It Fl dgst Ar alg 2152.It Fl dgst Ar alg
2167Sets the digest algorithm to use for certificate identification 2153Use the digest algorithm
2168in the OCSP request. 2154.Ar alg
2155for certificate identification in the OCSP request.
2169By default SHA-1 is used. 2156By default SHA-1 is used.
2170.It Xo 2157.It Xo
2171.Fl host Ar hostname : Ns Ar port , 2158.Fl host Ar hostname : Ns Ar port ,
2172.Fl path Ar path 2159.Fl path Ar path
2173.Xc 2160.Xc
2174If the 2161Send
2175.Fl host 2162the OCSP request to
2176option is present, then the OCSP request is sent to the host
2177.Ar hostname 2163.Ar hostname
2178on port 2164on
2179.Ar port . 2165.Ar port .
2180.Fl path 2166.Fl path
2181specifies the HTTP path name to use, or 2167specifies the HTTP path name to use, or
2182.Sq / 2168.Pa /
2183by default. 2169by default.
2184.It Fl issuer Ar file 2170.It Fl issuer Ar file
2185This specifies the current issuer certificate. 2171The current issuer certificate,
2186This option can be used multiple times. 2172in PEM format.
2187The certificate specified in 2173Can be used multiple times
2188.Ar file 2174and must come before any
2189must be in PEM format.
2190This option
2191.Em must
2192come before any
2193.Fl cert 2175.Fl cert
2194options. 2176options.
2195.It Fl no_cert_checks 2177.It Fl no_cert_checks
@@ -2202,14 +2184,14 @@ Don't verify the OCSP response signer's certificate at all.
2202Since this option allows the OCSP response to be signed by any certificate, 2184Since this option allows the OCSP response to be signed by any certificate,
2203it should only be used for testing purposes. 2185it should only be used for testing purposes.
2204.It Fl no_certs 2186.It Fl no_certs
2205Don't include any certificates in signed request. 2187Don't include any certificates in the signed request.
2206.It Fl no_chain 2188.It Fl no_chain
2207Do not use certificates in the response as additional untrusted CA 2189Do not use certificates in the response as additional untrusted CA
2208certificates. 2190certificates.
2209.It Fl no_intern 2191.It Fl no_intern
2210Ignore certificates contained in the OCSP response 2192Ignore certificates contained in the OCSP response
2211when searching for the signer's certificate. 2193when searching for the signer's certificate.
2212With this option, the signer's certificate must be specified with either the 2194The signer's certificate must be specified with either the
2213.Fl verify_other 2195.Fl verify_other
2214or 2196or
2215.Fl VAfile 2197.Fl VAfile
@@ -2219,40 +2201,29 @@ Don't check the signature on the OCSP response.
2219Since this option tolerates invalid signatures on OCSP responses, 2201Since this option tolerates invalid signatures on OCSP responses,
2220it will normally only be used for testing purposes. 2202it will normally only be used for testing purposes.
2221.It Fl nonce , no_nonce 2203.It Fl nonce , no_nonce
2222Add an OCSP 2204Add an OCSP nonce extension to a request,
2223.Em nonce 2205or disable an OCSP nonce addition.
2224extension to a request or disable an OCSP
2225.Em nonce
2226addition.
2227Normally, if an OCSP request is input using the 2206Normally, if an OCSP request is input using the
2228.Fl respin 2207.Fl respin
2229option no 2208option no nonce is added:
2230.Em nonce
2231is added:
2232using the 2209using the
2233.Fl nonce 2210.Fl nonce
2234option will force addition of a 2211option will force the addition of a nonce.
2235.Em nonce .
2236If an OCSP request is being created (using the 2212If an OCSP request is being created (using the
2237.Fl cert 2213.Fl cert
2238and 2214and
2239.Fl serial 2215.Fl serial
2240options) 2216options)
2241a 2217a nonce is automatically added; specifying
2242.Em nonce
2243is automatically added; specifying
2244.Fl no_nonce 2218.Fl no_nonce
2245overrides this. 2219overrides this.
2246.It Fl noverify 2220.It Fl noverify
2247Don't attempt to verify the OCSP response signature or the 2221Don't attempt to verify the OCSP response signature or the nonce values.
2248.Em nonce 2222This is normally only be used for debugging
2249values.
2250This option will normally only be used for debugging
2251since it disables all verification of the responder's certificate. 2223since it disables all verification of the responder's certificate.
2252.It Fl out Ar file 2224.It Fl out Ar file
2253Specify output 2225Specify the output file to write to,
2254.Ar file ; 2226or standard output if none is specified.
2255default is standard output.
2256.It Fl req_text , resp_text , text 2227.It Fl req_text , resp_text , text
2257Print out the text form of the OCSP request, response, or both, respectively. 2228Print out the text form of the OCSP request, response, or both, respectively.
2258.It Fl reqin Ar file , Fl respin Ar file 2229.It Fl reqin Ar file , Fl respin Ar file
@@ -2276,9 +2247,8 @@ option except the certificate with serial number
2276is added to the request. 2247is added to the request.
2277The serial number is interpreted as a decimal integer unless preceded by 2248The serial number is interpreted as a decimal integer unless preceded by
2278.Sq 0x . 2249.Sq 0x .
2279Negative integers can also be specified by preceding the value with a 2250Negative integers can also be specified
2280.Sq - 2251by preceding the value with a minus sign.
2281sign.
2282.It Fl sign_other Ar file 2252.It Fl sign_other Ar file
2283Additional certificates to include in the signed request. 2253Additional certificates to include in the signed request.
2284.It Fl signer Ar file , Fl signkey Ar file 2254.It Fl signer Ar file , Fl signkey Ar file
@@ -2305,21 +2275,16 @@ Both HTTP and HTTPS
2305.Pq SSL/TLS 2275.Pq SSL/TLS
2306URLs can be specified. 2276URLs can be specified.
2307.It Fl VAfile Ar file 2277.It Fl VAfile Ar file
2308.Ar file 2278A file containing explicitly trusted responder certificates.
2309containing explicitly trusted responder certificates.
2310Equivalent to the 2279Equivalent to the
2311.Fl verify_other 2280.Fl verify_other
2312and 2281and
2313.Fl trust_other 2282.Fl trust_other
2314options. 2283options.
2315.It Fl validity_period Ar nsec , Fl status_age Ar age 2284.It Fl validity_period Ar nsec , Fl status_age Ar age
2316These options specify the range of times, in seconds, which will be tolerated 2285The range of times, in seconds, which will be tolerated in an OCSP response.
2317in an OCSP response. 2286Each certificate status response includes a notBefore time
2318Each certificate status response includes a 2287and an optional notAfter time.
2319.Em notBefore
2320time and an optional
2321.Em notAfter
2322time.
2323The current time should fall between these two values, 2288The current time should fall between these two values,
2324but the interval between the two times may be only a few seconds. 2289but the interval between the two times may be only a few seconds.
2325In practice the OCSP responder and clients' clocks may not be precisely 2290In practice the OCSP responder and clients' clocks may not be precisely
@@ -2327,61 +2292,49 @@ synchronised and so such a check may fail.
2327To avoid this the 2292To avoid this the
2328.Fl validity_period 2293.Fl validity_period
2329option can be used to specify an acceptable error range in seconds, 2294option can be used to specify an acceptable error range in seconds,
2330the default value is 5 minutes. 2295the default value being 5 minutes.
2331.Pp 2296.Pp
2332If the 2297If the notAfter time is omitted from a response,
2333.Em notAfter 2298it means that new status information is immediately available.
2334time is omitted from a response, then this means that new status 2299In this case the age of the notBefore field is checked
2335information is immediately available. 2300to see it is not older than
2336In this case the age of the
2337.Em notBefore
2338field is checked to see it is not older than
2339.Ar age 2301.Ar age
2340seconds old. 2302seconds old.
2341By default, this additional check is not performed. 2303By default, this additional check is not performed.
2342.It Fl verify_other Ar file 2304.It Fl verify_other Ar file
2343.Ar file 2305A file containing additional certificates to search
2344containing additional certificates to search when attempting to locate 2306when attempting to locate the OCSP response signing certificate.
2345the OCSP response signing certificate. 2307Some responders omit the actual signer's certificate from the response,
2346Some responders omit the actual signer's certificate from the response; 2308so this can be used to supply the necessary certificate.
2347this option can be used to supply the necessary certificate in such cases.
2348.El 2309.El
2349.Sh OCSP SERVER OPTIONS 2310.Pp
2311The options for the OCSP server are as follows:
2350.Bl -tag -width "XXXX" 2312.Bl -tag -width "XXXX"
2351.It Fl CA Ar file 2313.It Fl CA Ar file
2352CA certificate corresponding to the revocation information in 2314CA certificate corresponding to the revocation information in
2353.Ar indexfile . 2315.Ar indexfile .
2354.It Fl index Ar indexfile 2316.It Fl index Ar indexfile
2355.Ar indexfile 2317.Ar indexfile
2356is a text index file in 2318is a text index file in ca format
2357.Nm ca 2319containing certificate revocation information.
2358format containing certificate revocation information.
2359.Pp 2320.Pp
2360If the 2321If this option is specified,
2361.Fl index
2362option is specified, the
2363.Nm ocsp 2322.Nm ocsp
2364utility is in 2323is in responder mode, otherwise it is in client mode.
2365.Em responder 2324The requests the responder processes can be either specified on
2366mode, otherwise it is in
2367.Em client
2368mode.
2369The request(s) the responder processes can be either specified on
2370the command line (using the 2325the command line (using the
2371.Fl issuer 2326.Fl issuer
2372and 2327and
2373.Fl serial 2328.Fl serial
2374options), supplied in a file (using the 2329options), supplied in a file (using the
2375.Fl respin 2330.Fl respin
2376option) or via external OCSP clients (if 2331option), or via external OCSP clients (if
2377.Ar port 2332.Ar port
2378or 2333or
2379.Ar url 2334.Ar url
2380is specified). 2335is specified).
2381.Pp 2336.Pp
2382If the 2337If this option is present, then the
2383.Fl index
2384option is present, then the
2385.Fl CA 2338.Fl CA
2386and 2339and
2387.Fl rsigner 2340.Fl rsigner
@@ -2391,24 +2344,23 @@ Number of
2391.Ar minutes 2344.Ar minutes
2392or 2345or
2393.Ar days 2346.Ar days
2394when fresh revocation information is available: used in the 2347when fresh revocation information is available:
2395.Ar nextUpdate 2348used in the nextUpdate field.
2396field. 2349If neither option is present,
2397If neither option is present, the 2350the nextUpdate field is omitted,
2398.Em nextUpdate 2351meaning fresh revocation information is immediately available.
2399field is omitted, meaning fresh revocation information is immediately available.
2400.It Fl nrequest Ar number 2352.It Fl nrequest Ar number
2401The OCSP server will exit after receiving 2353Exit after receiving
2402.Ar number 2354.Ar number
2403requests, default unlimited. 2355requests (the default is unlimited).
2404.It Fl port Ar portnum 2356.It Fl port Ar portnum
2405Port to listen for OCSP requests on. 2357Port to listen for OCSP requests on.
2406The port may also be specified using the 2358May also be specified using the
2407.Fl url 2359.Fl url
2408option. 2360option.
2409.It Fl resp_key_id 2361.It Fl resp_key_id
2410Identify the signer certificate using the key ID; 2362Identify the signer certificate using the key ID;
2411default is to use the subject name. 2363the default is to use the subject name.
2412.It Fl resp_no_certs 2364.It Fl resp_no_certs
2413Don't include any certificates in the OCSP response. 2365Don't include any certificates in the OCSP response.
2414.It Fl rkey Ar file 2366.It Fl rkey Ar file
@@ -2421,12 +2373,9 @@ Additional certificates to include in the OCSP response.
2421.It Fl rsigner Ar file 2373.It Fl rsigner Ar file
2422The certificate to sign OCSP responses with. 2374The certificate to sign OCSP responses with.
2423.El 2375.El
2424.Sh OCSP RESPONSE VERIFICATION
2425OCSP Response follows the rules specified in RFC 2560.
2426.Pp 2376.Pp
2427Initially the OCSP responder certificate is located and the signature on 2377Initially the OCSP responder certificate is located and the signature on
2428the OCSP request checked using the responder certificate's public key. 2378the OCSP request checked using the responder certificate's public key.
2429.Pp
2430Then a normal certificate verify is performed on the OCSP responder certificate 2379Then a normal certificate verify is performed on the OCSP responder certificate
2431building up a certificate chain in the process. 2380building up a certificate chain in the process.
2432The locations of the trusted certificates used to build the chain can be 2381The locations of the trusted certificates used to build the chain can be
@@ -2435,13 +2384,10 @@ specified by the
2435and 2384and
2436.Fl CApath 2385.Fl CApath
2437options or they will be looked for in the standard 2386options or they will be looked for in the standard
2438.Nm OpenSSL 2387.Nm openssl
2439certificates 2388certificates directory.
2440directory.
2441.Pp
2442If the initial verify fails, the OCSP verify process halts with an
2443error.
2444.Pp 2389.Pp
2390If the initial verify fails, the OCSP verify process halts with an error.
2445Otherwise the issuing CA certificate in the request is compared to the OCSP 2391Otherwise the issuing CA certificate in the request is compared to the OCSP
2446responder certificate: if there is a match then the OCSP verify succeeds. 2392responder certificate: if there is a match then the OCSP verify succeeds.
2447.Pp 2393.Pp
@@ -2455,16 +2401,15 @@ is trusted for OCSP signing.
2455If it is, the OCSP verify succeeds. 2401If it is, the OCSP verify succeeds.
2456.Pp 2402.Pp
2457If none of these checks is successful, the OCSP verify fails. 2403If none of these checks is successful, the OCSP verify fails.
2458.Pp
2459What this effectively means is that if the OCSP responder certificate is 2404What this effectively means is that if the OCSP responder certificate is
2460authorised directly by the CA it is issuing revocation information about 2405authorised directly by the CA it is issuing revocation information about
2461.Pq and it is correctly configured , 2406(and it is correctly configured),
2462then verification will succeed. 2407then verification will succeed.
2463.Pp 2408.Pp
2464If the OCSP responder is a 2409If the OCSP responder is a global responder,
2465.Em global responder 2410which can give details about multiple CAs
2466which can give details about multiple CAs and has its own separate 2411and has its own separate certificate chain,
2467certificate chain, then its root CA can be trusted for OCSP signing. 2412then its root CA can be trusted for OCSP signing.
2468For example: 2413For example:
2469.Bd -literal -offset indent 2414.Bd -literal -offset indent
2470$ openssl x509 -in ocspCA.pem -addtrust OCSPSigning \e 2415$ openssl x509 -in ocspCA.pem -addtrust OCSPSigning \e
@@ -2475,79 +2420,6 @@ Alternatively, the responder certificate itself can be explicitly trusted
2475with the 2420with the
2476.Fl VAfile 2421.Fl VAfile
2477option. 2422option.
2478.Sh OCSP NOTES
2479As noted, most of the verify options are for testing or debugging purposes.
2480Normally, only the
2481.Fl CApath , CAfile
2482and
2483.Pq if the responder is a `global VA'
2484.Fl VAfile
2485options need to be used.
2486.Pp
2487The OCSP server is only useful for test and demonstration purposes:
2488it is not really usable as a full OCSP responder.
2489It contains only a very simple HTTP request handling and can only handle
2490the POST form of OCSP queries.
2491It also handles requests serially, meaning it cannot respond to
2492new requests until it has processed the current one.
2493The text index file format of revocation is also inefficient for large
2494quantities of revocation data.
2495.Pp
2496It is possible to run the
2497.Nm ocsp
2498application in
2499.Em responder
2500mode via a CGI script using the
2501.Fl respin
2502and
2503.Fl respout
2504options.
2505.Sh OCSP EXAMPLES
2506Create an OCSP request and write it to a file:
2507.Bd -literal -offset indent
2508$ openssl ocsp -issuer issuer.pem -cert c1.pem -cert c2.pem \e
2509 -reqout req.der
2510.Ed
2511.Pp
2512Send a query to an OCSP responder with URL
2513.Pa http://ocsp.myhost.com/ ,
2514save the response to a file and print it out in text form:
2515.Bd -literal -offset indent
2516$ openssl ocsp -issuer issuer.pem -cert c1.pem -cert c2.pem \e
2517 -url http://ocsp.myhost.com/ -resp_text -respout resp.der
2518.Ed
2519.Pp
2520Read in an OCSP response and print out in text form:
2521.Pp
2522.Dl $ openssl ocsp -respin resp.der -text
2523.Pp
2524OCSP server on port 8888 using a standard
2525.Nm ca
2526configuration, and a separate responder certificate.
2527All requests and responses are printed to a file:
2528.Bd -literal -offset indent
2529$ openssl ocsp -index demoCA/index.txt -port 8888 -rsigner \e
2530 rcert.pem -CA demoCA/cacert.pem -text -out log.txt
2531.Ed
2532.Pp
2533As above, but exit after processing one request:
2534.Bd -literal -offset indent
2535$ openssl ocsp -index demoCA/index.txt -port 8888 -rsigner \e
2536 rcert.pem -CA demoCA/cacert.pem -nrequest 1
2537.Ed
2538.Pp
2539Query status information using internally generated request:
2540.Bd -literal -offset indent
2541$ openssl ocsp -index demoCA/index.txt -rsigner rcert.pem -CA \e
2542 demoCA/cacert.pem -issuer demoCA/cacert.pem -serial 1
2543.Ed
2544.Pp
2545Query status information using request read from a file and write
2546the response to a second file:
2547.Bd -literal -offset indent
2548$ openssl ocsp -index demoCA/index.txt -rsigner rcert.pem -CA \e
2549 demoCA/cacert.pem -reqin req.der -respout resp.der
2550.Ed
2551.\" 2423.\"
2552.\" PASSWD 2424.\" PASSWD
2553.\" 2425.\"