summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorschwarze <>2016-11-30 14:16:38 +0000
committerschwarze <>2016-11-30 14:16:38 +0000
commit194dbb0467a1ca55270aab260f9669d6c2c17d2e (patch)
tree4a68c3a1d621543da1c2918116a88336d9e6d53c
parent0804b651c1d78d0731a2655e5e1e017b9ee9b9a6 (diff)
downloadopenbsd-194dbb0467a1ca55270aab260f9669d6c2c17d2e.tar.gz
openbsd-194dbb0467a1ca55270aab260f9669d6c2c17d2e.tar.bz2
openbsd-194dbb0467a1ca55270aab260f9669d6c2c17d2e.zip
Add Copyright and license.
Merge SSL_CTX_set_default_verify_paths(3) documentation from OpenSSL, but do not talk about environment variables, which LibreSSL does not appear to support, judging from the source code. Rename WARNINGS section to CAVEATS.
-rw-r--r--src/lib/libssl/man/SSL_CTX_load_verify_locations.399
1 files changed, 85 insertions, 14 deletions
diff --git a/src/lib/libssl/man/SSL_CTX_load_verify_locations.3 b/src/lib/libssl/man/SSL_CTX_load_verify_locations.3
index 0d023cb475..5433a8d420 100644
--- a/src/lib/libssl/man/SSL_CTX_load_verify_locations.3
+++ b/src/lib/libssl/man/SSL_CTX_load_verify_locations.3
@@ -1,11 +1,60 @@
1.\" $OpenBSD: SSL_CTX_load_verify_locations.3,v 1.2 2016/11/30 14:16:38 schwarze Exp $
2.\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400
1.\" 3.\"
2.\" $OpenBSD: SSL_CTX_load_verify_locations.3,v 1.1 2016/11/05 15:32:19 schwarze Exp $ 4.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>.
5.\" Copyright (c) 2000, 2001, 2015, 2016 The OpenSSL Project.
6.\" All rights reserved.
3.\" 7.\"
4.Dd $Mdocdate: November 5 2016 $ 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions
10.\" are met:
11.\"
12.\" 1. Redistributions of source code must retain the above copyright
13.\" notice, this list of conditions and the following disclaimer.
14.\"
15.\" 2. Redistributions in binary form must reproduce the above copyright
16.\" notice, this list of conditions and the following disclaimer in
17.\" the documentation and/or other materials provided with the
18.\" distribution.
19.\"
20.\" 3. All advertising materials mentioning features or use of this
21.\" software must display the following acknowledgment:
22.\" "This product includes software developed by the OpenSSL Project
23.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
24.\"
25.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26.\" endorse or promote products derived from this software without
27.\" prior written permission. For written permission, please contact
28.\" openssl-core@openssl.org.
29.\"
30.\" 5. Products derived from this software may not be called "OpenSSL"
31.\" nor may "OpenSSL" appear in their names without prior written
32.\" permission of the OpenSSL Project.
33.\"
34.\" 6. Redistributions of any form whatsoever must retain the following
35.\" acknowledgment:
36.\" "This product includes software developed by the OpenSSL Project
37.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)"
38.\"
39.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50.\" OF THE POSSIBILITY OF SUCH DAMAGE.
51.\"
52.Dd $Mdocdate: November 30 2016 $
5.Dt SSL_CTX_LOAD_VERIFY_LOCATIONS 3 53.Dt SSL_CTX_LOAD_VERIFY_LOCATIONS 3
6.Os 54.Os
7.Sh NAME 55.Sh NAME
8.Nm SSL_CTX_load_verify_locations 56.Nm SSL_CTX_load_verify_locations ,
57.Nm SSL_CTX_set_default_verify_paths
9.Nd set default locations for trusted CA certificates 58.Nd set default locations for trusted CA certificates
10.Sh SYNOPSIS 59.Sh SYNOPSIS
11.In openssl/ssl.h 60.In openssl/ssl.h
@@ -13,6 +62,10 @@
13.Fo SSL_CTX_load_verify_locations 62.Fo SSL_CTX_load_verify_locations
14.Fa "SSL_CTX *ctx" "const char *CAfile" "const char *CApath" 63.Fa "SSL_CTX *ctx" "const char *CAfile" "const char *CApath"
15.Fc 64.Fc
65.Ft int
66.Fo SSL_CTX_set_default_verify_paths
67.Fa "SSL_CTX *ctx"
68.Fc
16.Sh DESCRIPTION 69.Sh DESCRIPTION
17.Fn SSL_CTX_load_verify_locations 70.Fn SSL_CTX_load_verify_locations
18specifies the locations for 71specifies the locations for
@@ -23,7 +76,18 @@ The certificates available via
23and 76and
24.Fa CApath 77.Fa CApath
25are trusted. 78are trusted.
26.Sh NOTES 79.Pp
80.Fn SSL_CTX_set_default_verify_paths
81specifies that the default locations from which CA certificates are
82loaded should be used.
83There is one default directory and one default file.
84The default CA certificates directory is called
85.Pa certs
86in the default OpenSSL directory.
87The default CA certificates file is called
88.Pa cert.pem
89in the default OpenSSL directory.
90.Pp
27If 91If
28.Fa CAfile 92.Fa CAfile
29is not 93is not
@@ -35,6 +99,7 @@ The file can contain several CA certificates identified by sequences of:
35 ... (CA certificate in base64 encoding) ... 99 ... (CA certificate in base64 encoding) ...
36 -----END CERTIFICATE----- 100 -----END CERTIFICATE-----
37.Ed 101.Ed
102.Pp
38Before, between, and after the certificates arbitrary text is allowed which can 103Before, between, and after the certificates arbitrary text is allowed which can
39be used, e.g., for descriptions of the certificates. 104be used, e.g., for descriptions of the certificates.
40.Pp 105.Pp
@@ -94,17 +159,10 @@ certificate chain was not explicitly specified (see
94.Xr SSL_CTX_add_extra_chain_cert 3 159.Xr SSL_CTX_add_extra_chain_cert 3
95and 160and
96.Xr SSL_CTX_use_certificate 3 ) . 161.Xr SSL_CTX_use_certificate 3 ) .
97.Sh WARNINGS
98If several CA certificates matching the name, key identifier, and serial
99number condition are available, only the first one will be examined.
100This may lead to unexpected results if the same CA certificate is available
101with different expiration dates.
102If a
103.Dq certificate expired
104verification error occurs, no other certificate will be searched.
105Make sure to not have expired certificates mixed with valid ones.
106.Sh RETURN VALUES 162.Sh RETURN VALUES
107The following return values can occur: 163For
164.Fn SSL_CTX_load_verify_locations ,
165the following return values can occur:
108.Bl -tag -width Ds 166.Bl -tag -width Ds
109.It 0 167.It 0
110The operation failed because 168The operation failed because
@@ -118,6 +176,10 @@ Check the error stack to find out the reason.
118.It 1 176.It 1
119The operation succeeded. 177The operation succeeded.
120.El 178.El
179.Pp
180.Fn SSL_CTX_set_default_verify_paths
181returns 1 on success or 0 on failure.
182A missing default location is still treated as a success.
121.Sh EXAMPLES 183.Sh EXAMPLES
122Generate a CA certificate file with descriptive text from the CA certificates 184Generate a CA certificate file with descriptive text from the CA certificates
123.Pa ca1.pem 185.Pa ca1.pem
@@ -159,3 +221,12 @@ $ for c in *.pem; do
159.Xr SSL_CTX_set_client_CA_list 3 , 221.Xr SSL_CTX_set_client_CA_list 3 ,
160.Xr SSL_CTX_use_certificate 3 , 222.Xr SSL_CTX_use_certificate 3 ,
161.Xr SSL_get_client_CA_list 3 223.Xr SSL_get_client_CA_list 3
224.Sh CAVEATS
225If several CA certificates matching the name, key identifier, and serial
226number condition are available, only the first one will be examined.
227This may lead to unexpected results if the same CA certificate is available
228with different expiration dates.
229If a
230.Dq certificate expired
231verification error occurs, no other certificate will be searched.
232Make sure to not have expired certificates mixed with valid ones.