diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/man/SSL_CTX_load_verify_locations.3 | 99 |
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 |
| 18 | specifies the locations for | 71 | specifies the locations for |
| @@ -23,7 +76,18 @@ The certificates available via | |||
| 23 | and | 76 | and |
| 24 | .Fa CApath | 77 | .Fa CApath |
| 25 | are trusted. | 78 | are trusted. |
| 26 | .Sh NOTES | 79 | .Pp |
| 80 | .Fn SSL_CTX_set_default_verify_paths | ||
| 81 | specifies that the default locations from which CA certificates are | ||
| 82 | loaded should be used. | ||
| 83 | There is one default directory and one default file. | ||
| 84 | The default CA certificates directory is called | ||
| 85 | .Pa certs | ||
| 86 | in the default OpenSSL directory. | ||
| 87 | The default CA certificates file is called | ||
| 88 | .Pa cert.pem | ||
| 89 | in the default OpenSSL directory. | ||
| 90 | .Pp | ||
| 27 | If | 91 | If |
| 28 | .Fa CAfile | 92 | .Fa CAfile |
| 29 | is not | 93 | is 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 | ||
| 38 | Before, between, and after the certificates arbitrary text is allowed which can | 103 | Before, between, and after the certificates arbitrary text is allowed which can |
| 39 | be used, e.g., for descriptions of the certificates. | 104 | be 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 |
| 95 | and | 160 | and |
| 96 | .Xr SSL_CTX_use_certificate 3 ) . | 161 | .Xr SSL_CTX_use_certificate 3 ) . |
| 97 | .Sh WARNINGS | ||
| 98 | If several CA certificates matching the name, key identifier, and serial | ||
| 99 | number condition are available, only the first one will be examined. | ||
| 100 | This may lead to unexpected results if the same CA certificate is available | ||
| 101 | with different expiration dates. | ||
| 102 | If a | ||
| 103 | .Dq certificate expired | ||
| 104 | verification error occurs, no other certificate will be searched. | ||
| 105 | Make sure to not have expired certificates mixed with valid ones. | ||
| 106 | .Sh RETURN VALUES | 162 | .Sh RETURN VALUES |
| 107 | The following return values can occur: | 163 | For |
| 164 | .Fn SSL_CTX_load_verify_locations , | ||
| 165 | the following return values can occur: | ||
| 108 | .Bl -tag -width Ds | 166 | .Bl -tag -width Ds |
| 109 | .It 0 | 167 | .It 0 |
| 110 | The operation failed because | 168 | The operation failed because |
| @@ -118,6 +176,10 @@ Check the error stack to find out the reason. | |||
| 118 | .It 1 | 176 | .It 1 |
| 119 | The operation succeeded. | 177 | The operation succeeded. |
| 120 | .El | 178 | .El |
| 179 | .Pp | ||
| 180 | .Fn SSL_CTX_set_default_verify_paths | ||
| 181 | returns 1 on success or 0 on failure. | ||
| 182 | A missing default location is still treated as a success. | ||
| 121 | .Sh EXAMPLES | 183 | .Sh EXAMPLES |
| 122 | Generate a CA certificate file with descriptive text from the CA certificates | 184 | Generate 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 | ||
| 225 | If several CA certificates matching the name, key identifier, and serial | ||
| 226 | number condition are available, only the first one will be examined. | ||
| 227 | This may lead to unexpected results if the same CA certificate is available | ||
| 228 | with different expiration dates. | ||
| 229 | If a | ||
| 230 | .Dq certificate expired | ||
| 231 | verification error occurs, no other certificate will be searched. | ||
| 232 | Make sure to not have expired certificates mixed with valid ones. | ||
