summaryrefslogtreecommitdiff
path: root/doc/cha-cert-auth2.texi
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-21 13:20:32 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-01-21 13:20:32 +0100
commit3576fcddb9ee310aa21a1dacbd85b73c9e0ae45c (patch)
tree223c4780aa7c08d8167dd4f6d6184eae9768351f /doc/cha-cert-auth2.texi
parent217daa4c01f79fc11720414e7083c785e40fef3b (diff)
downloadgnutls-3576fcddb9ee310aa21a1dacbd85b73c9e0ae45c.tar.gz
replaced smallexample with example.
Diffstat (limited to 'doc/cha-cert-auth2.texi')
-rw-r--r--doc/cha-cert-auth2.texi48
1 files changed, 24 insertions, 24 deletions
diff --git a/doc/cha-cert-auth2.texi b/doc/cha-cert-auth2.texi
index 27caf4930f..828fcce93c 100644
--- a/doc/cha-cert-auth2.texi
+++ b/doc/cha-cert-auth2.texi
@@ -734,25 +734,25 @@ The @code{-Q} parameter specify the name of the file containing the
OCSP request, and it should contain the OCSP request in binary DER
format.
-@smallexample
+@example
$ ocsptool -i -Q ocsp-request.der
-@end smallexample
+@end example
The input file may also be sent to standard input like this:
-@smallexample
+@example
$ cat ocsp-request.der | ocsptool --request-info
-@end smallexample
+@end example
@subheading Print information about an OCSP response
Similar to parsing OCSP requests, OCSP responses can be parsed using
the @code{-j} or @code{--response-info} as follows.
-@smallexample
+@example
$ ocsptool -j -Q ocsp-response.der
$ cat ocsp-response.der | ocsptool --response-info
-@end smallexample
+@end example
@subheading Generate an OCSP request
@@ -765,9 +765,9 @@ and the certificate to check with @code{--load-cert}. By default PEM
format is used for these files, although @code{--inder} can be used to
specify that the input files are in DER format.
-@smallexample
+@example
$ ocsptool -q --load-issuer issuer.pem --load-cert client.pem --outfile ocsp-request.der
-@end smallexample
+@end example
When generating OCSP requests, the tool will add an OCSP extension
containing a nonce. This behaviour can be disabled by specifying
@@ -786,9 +786,9 @@ be in the set of trust anchors, or the issuer of the signer
certificate needs to be in the set of trust anchors and the OCSP
Extended Key Usage bit has to be asserted in the signer certificate.
-@smallexample
+@example
$ ocsptool -e --load-trust issuer.pem --load-response ocsp-response.der
-@end smallexample
+@end example
The tool will print status of verification.
@@ -801,9 +801,9 @@ you want to use it to check the signature. This is achieved using
one certificate and it will be used to verify the signature in the
OCSP response. It will not check the Extended Key Usage bit.
-@smallexample
+@example
$ ocsptool -e --load-signer ocsp-signer.pem --load-response ocsp-response.der
-@end smallexample
+@end example
This approach is normally only relevant in two situations. The first
is when the OCSP response does not contain a copy of the signer
@@ -820,9 +820,9 @@ certificate from CACert. First we'll use @code{gnutls-cli} to get a
copy of the server certificate chain. The server is not required to
send this information, but this particular one is configured to do so.
-@smallexample
+@example
$ echo | gnutls-cli -p 443 blog.josefsson.org --print-cert > chain.pem
-@end smallexample
+@end example
Use a text editor on @code{chain.pem} to create three files for each
separate certificates, called @code{cert.pem} for the first
@@ -835,47 +835,47 @@ responder is located, in the Authority Information Access Information
extension. For example, from @code{certtool -i < cert.pem} there is
this information:
-@smallexample
+@example
Authority Information Access Information (not critical):
Access Method: 1.3.6.1.5.5.7.48.1 (id-ad-ocsp)
Access Location URI: http://ocsp.CAcert.org/
-@end smallexample
+@end example
This means the CA support OCSP queries over HTTP. We are now ready to
create a OCSP request for the certificate.
-@smallexample
+@example
$ ocsptool --generate-request --load-issuer issuer.pem --load-cert cert.pem --outfile ocsp-request.der
-@end smallexample
+@end example
The request is sent base64 encoded via HTTP to the address indicated
by the id-ad-ocsp extension, as follows.
-@smallexample
+@example
$ wget -O ocsp-response.der http://ocsp.CAcert.org/$(base64 -w0 ocsp-request.der)
-@end smallexample
+@end example
The OCSP response is now in the file @code{ocsp-response.der} and you
can view it using @code{ocsptool -j < ocsp-response.der}. To verify
the signature you need to load the issuer as the trust anchor.
-@smallexample
+@example
$ ocsptool --verify-response --load-trust issuer.pem --load-response ocsp-response.der
Verifying OCSP Response: Success.
$
-@end smallexample
+@end example
This particular OCSP responder includes its signer certificate in the
OCSP respnose, so you may extract it and use it together with
@code{--load-signer} for verifying the signature directly against the
certificate.
-@smallexample
+@example
$ ocsptool -j < ocsp-response.der > signer.pem
$ ocsptool --verify-response --load-signer signer.pem --load-response ocsp-response.der
Verifying OCSP Response: Success.
$
-@end smallexample
+@end example
You may experiment passing different certificates to
@code{--load-trust} and @code{--load-signer} to find common error