diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/man/Makefile | 3 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 | 113 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_LOOKUP_new.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_STORE_load_locations.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_STORE_new.3 | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_load_cert_file.3 | 133 | ||||
| -rw-r--r-- | src/lib/libcrypto/man/X509_new.3 | 5 | 
7 files changed, 157 insertions, 112 deletions
| diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 53d20760eb..6e8753b379 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | # $OpenBSD: Makefile,v 1.209 2021/11/07 15:29:01 schwarze Exp $ | 1 | # $OpenBSD: Makefile,v 1.210 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | 2 | ||
| 3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> | 
| 4 | 4 | ||
| @@ -348,6 +348,7 @@ MAN= \ | |||
| 348 | X509_get_subject_name.3 \ | 348 | X509_get_subject_name.3 \ | 
| 349 | X509_get_version.3 \ | 349 | X509_get_version.3 \ | 
| 350 | X509_keyid_set1.3 \ | 350 | X509_keyid_set1.3 \ | 
| 351 | X509_load_cert_file.3 \ | ||
| 351 | X509_new.3 \ | 352 | X509_new.3 \ | 
| 352 | X509_ocspid_print.3 \ | 353 | X509_ocspid_print.3 \ | 
| 353 | X509_policy_check.3 \ | 354 | X509_policy_check.3 \ | 
| diff --git a/src/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 b/src/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 index 14e49f3a77..b1f6a17571 100644 --- a/src/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 +++ b/src/lib/libcrypto/man/X509_LOOKUP_hash_dir.3 | |||
| @@ -1,5 +1,6 @@ | |||
| 1 | .\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.10 2021/07/31 14:54:33 schwarze Exp $ | 1 | .\" $OpenBSD: X509_LOOKUP_hash_dir.3,v 1.11 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | .\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | 2 | .\" full merge up to: OpenSSL 61f805c1 Jan 16 01:01:46 2018 +0800 | 
| 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | ||
| 3 | .\" | 4 | .\" | 
| 4 | .\" This file is a derived work. | 5 | .\" This file is a derived work. | 
| 5 | .\" The changes are covered by the following Copyright and license: | 6 | .\" The changes are covered by the following Copyright and license: | 
| @@ -20,7 +21,7 @@ | |||
| 20 | .\" | 21 | .\" | 
| 21 | .\" The original file was written by Victor B. Wagner <vitus@cryptocom.ru> | 22 | .\" The original file was written by Victor B. Wagner <vitus@cryptocom.ru> | 
| 22 | .\" and Claus Assmann. | 23 | .\" and Claus Assmann. | 
| 23 | .\" Copyright (c) 2015, 2016, 2017 The OpenSSL Project. All rights reserved. | 24 | .\" Copyright (c) 2015, 2016 The OpenSSL Project. All rights reserved. | 
| 24 | .\" | 25 | .\" | 
| 25 | .\" Redistribution and use in source and binary forms, with or without | 26 | .\" Redistribution and use in source and binary forms, with or without | 
| 26 | .\" modification, are permitted provided that the following conditions | 27 | .\" modification, are permitted provided that the following conditions | 
| @@ -66,16 +67,13 @@ | |||
| 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 
| 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 68 | .\" | 69 | .\" | 
| 69 | .Dd $Mdocdate: July 31 2021 $ | 70 | .Dd $Mdocdate: November 9 2021 $ | 
| 70 | .Dt X509_LOOKUP_HASH_DIR 3 | 71 | .Dt X509_LOOKUP_HASH_DIR 3 | 
| 71 | .Os | 72 | .Os | 
| 72 | .Sh NAME | 73 | .Sh NAME | 
| 73 | .Nm X509_LOOKUP_hash_dir , | 74 | .Nm X509_LOOKUP_hash_dir , | 
| 74 | .Nm X509_LOOKUP_file , | 75 | .Nm X509_LOOKUP_file , | 
| 75 | .Nm X509_LOOKUP_mem , | 76 | .Nm X509_LOOKUP_mem | 
| 76 | .Nm X509_load_cert_file , | ||
| 77 | .Nm X509_load_crl_file , | ||
| 78 | .Nm X509_load_cert_crl_file | ||
| 79 | .Nd default certificate lookup methods | 77 | .Nd default certificate lookup methods | 
| 80 | .Sh SYNOPSIS | 78 | .Sh SYNOPSIS | 
| 81 | .In openssl/x509_vfy.h | 79 | .In openssl/x509_vfy.h | 
| @@ -85,24 +83,6 @@ | |||
| 85 | .Fn X509_LOOKUP_file void | 83 | .Fn X509_LOOKUP_file void | 
| 86 | .Ft X509_LOOKUP_METHOD * | 84 | .Ft X509_LOOKUP_METHOD * | 
| 87 | .Fn X509_LOOKUP_mem void | 85 | .Fn X509_LOOKUP_mem void | 
| 88 | .Ft int | ||
| 89 | .Fo X509_load_cert_file | ||
| 90 | .Fa "X509_LOOKUP *ctx" | ||
| 91 | .Fa "const char *file" | ||
| 92 | .Fa "int type" | ||
| 93 | .Fc | ||
| 94 | .Ft int | ||
| 95 | .Fo X509_load_crl_file | ||
| 96 | .Fa "X509_LOOKUP *ctx" | ||
| 97 | .Fa "const char *file" | ||
| 98 | .Fa "int type" | ||
| 99 | .Fc | ||
| 100 | .Ft int | ||
| 101 | .Fo X509_load_cert_crl_file | ||
| 102 | .Fa "X509_LOOKUP *ctx" | ||
| 103 | .Fa "const char *file" | ||
| 104 | .Fa "int type" | ||
| 105 | .Fc | ||
| 106 | .Sh DESCRIPTION | 86 | .Sh DESCRIPTION | 
| 107 | .Fn X509_LOOKUP_hash_dir , | 87 | .Fn X509_LOOKUP_hash_dir , | 
| 108 | .Fn X509_LOOKUP_file , | 88 | .Fn X509_LOOKUP_file , | 
| @@ -119,54 +99,6 @@ They are automatically used by the | |||
| 119 | or | 99 | or | 
| 120 | .Xr SSL_CTX_load_verify_locations 3 | 100 | .Xr SSL_CTX_load_verify_locations 3 | 
| 121 | functions. | 101 | functions. | 
| 122 | .Pp | ||
| 123 | Internally, loading of certificates and CRLs is implemented via the functions | ||
| 124 | .Fn X509_load_cert_crl_file , | ||
| 125 | .Fn X509_load_cert_file | ||
| 126 | and | ||
| 127 | .Fn X509_load_crl_file . | ||
| 128 | These functions support a parameter | ||
| 129 | .Fa type , | ||
| 130 | which can be one of the constants | ||
| 131 | .Dv FILETYPE_PEM , | ||
| 132 | .Dv FILETYPE_ASN1 , | ||
| 133 | and | ||
| 134 | .Dv FILETYPE_DEFAULT . | ||
| 135 | They load certificates and/or CRLs from the specified file into a | ||
| 136 | memory cache of | ||
| 137 | .Vt X509_STORE | ||
| 138 | objects which the given | ||
| 139 | .Fa ctx | ||
| 140 | parameter is associated with. | ||
| 141 | .Pp | ||
| 142 | The functions | ||
| 143 | .Fn X509_load_cert_file | ||
| 144 | and | ||
| 145 | .Fn X509_load_crl_file | ||
| 146 | can load both PEM and DER formats depending on the | ||
| 147 | .Fa type | ||
| 148 | value. | ||
| 149 | Because DER format cannot contain more than one certificate or CRL | ||
| 150 | object (while PEM can contain several concatenated PEM objects), | ||
| 151 | .Fn X509_load_cert_crl_file | ||
| 152 | with | ||
| 153 | .Dv FILETYPE_ASN1 | ||
| 154 | is equivalent to | ||
| 155 | .Fn X509_load_cert_file . | ||
| 156 | .Pp | ||
| 157 | The constant | ||
| 158 | .Dv FILETYPE_DEFAULT | ||
| 159 | with | ||
| 160 | .Dv NULL | ||
| 161 | filename causes these functions to load the default certificate | ||
| 162 | store file (see | ||
| 163 | .Xr X509_STORE_set_default_paths 3 ) . | ||
| 164 | .Pp | ||
| 165 | All three methods support adding several certificate locations into one | ||
| 166 | .Sy X509_STORE . | ||
| 167 | .Pp | ||
| 168 | This page documents certificate store formats used by these methods and | ||
| 169 | caching policy. | ||
| 170 | .Ss File Method | 102 | .Ss File Method | 
| 171 | The | 103 | The | 
| 172 | .Fn X509_LOOKUP_file | 104 | .Fn X509_LOOKUP_file | 
| @@ -186,7 +118,7 @@ As of OpenSSL 1.0.0, it also checks for newer CRLs upon each lookup, so | |||
| 186 | that newer CRLs are used as soon as they appear in the directory. | 118 | that newer CRLs are used as soon as they appear in the directory. | 
| 187 | .Pp | 119 | .Pp | 
| 188 | The directory should contain one certificate or CRL per file in PEM | 120 | The directory should contain one certificate or CRL per file in PEM | 
| 189 | format, with a file name of the form | 121 | format, with a filename of the form | 
| 190 | .Ar hash . Ns Ar N | 122 | .Ar hash . Ns Ar N | 
| 191 | for a certificate, or | 123 | for a certificate, or | 
| 192 | .Ar hash . Ns Sy r Ns Ar N | 124 | .Ar hash . Ns Sy r Ns Ar N | 
| @@ -238,44 +170,19 @@ that are already stored in memory, using the function | |||
| 238 | This is particularly useful in processes using | 170 | This is particularly useful in processes using | 
| 239 | .Xr chroot 2 . | 171 | .Xr chroot 2 . | 
| 240 | .Sh RETURN VALUES | 172 | .Sh RETURN VALUES | 
| 241 | .Fn X509_LOOKUP_hash_dir , | 173 | These functions always return a pointer to a static object. | 
| 242 | .Fn X509_LOOKUP_file , | ||
| 243 | and | ||
| 244 | .Fn X509_LOOKUP_mem | ||
| 245 | always return a pointer to a static | ||
| 246 | .Vt X509_LOOKUP_METHOD | ||
| 247 | object. | ||
| 248 | .Pp | ||
| 249 | .Fn X509_load_cert_file , | ||
| 250 | .Fn X509_load_crl_file , | ||
| 251 | and | ||
| 252 | .Fn X509_load_cert_crl_file | ||
| 253 | return the number of objects loaded from the | ||
| 254 | .Fa file | ||
| 255 | or 0 on error. | ||
| 256 | .Sh SEE ALSO | 174 | .Sh SEE ALSO | 
| 257 | .Xr d2i_X509_bio 3 , | ||
| 258 | .Xr PEM_read_PrivateKey 3 , | ||
| 259 | .Xr SSL_CTX_load_verify_locations 3 , | 175 | .Xr SSL_CTX_load_verify_locations 3 , | 
| 260 | .Xr X509_LOOKUP_new 3 , | 176 | .Xr X509_LOOKUP_new 3 , | 
| 261 | .Xr X509_OBJECT_get0_X509 3 , | ||
| 262 | .Xr X509_STORE_load_locations 3 , | 177 | .Xr X509_STORE_load_locations 3 , | 
| 263 | .Xr X509_STORE_new 3 | 178 | .Xr X509_STORE_new 3 | 
| 264 | .Sh HISTORY | 179 | .Sh HISTORY | 
| 265 | .Fn X509_LOOKUP_hash_dir , | 180 | .Fn X509_LOOKUP_hash_dir | 
| 266 | .Fn X509_LOOKUP_file , | ||
| 267 | and | 181 | and | 
| 268 | .Fn X509_load_cert_file | 182 | .Fn X509_LOOKUP_file | 
| 269 | first appeared in SSLeay 0.8.0. | 183 | first appeared in SSLeay 0.8.0 and have been available since | 
| 270 | .Fn X509_load_crl_file | ||
| 271 | first appeared in SSLeay 0.9.0. | ||
| 272 | These functions have been available since | ||
| 273 | .Ox 2.4 . | 184 | .Ox 2.4 . | 
| 274 | .Pp | 185 | .Pp | 
| 275 | .Fn X509_load_cert_crl_file | ||
| 276 | first appeared in OpenSSL 0.9.5 and has been available since | ||
| 277 | .Ox 2.7 . | ||
| 278 | .Pp | ||
| 279 | .Fn X509_LOOKUP_mem | 186 | .Fn X509_LOOKUP_mem | 
| 280 | first appeared in | 187 | first appeared in | 
| 281 | .Ox 5.7 . | 188 | .Ox 5.7 . | 
| diff --git a/src/lib/libcrypto/man/X509_LOOKUP_new.3 b/src/lib/libcrypto/man/X509_LOOKUP_new.3 index f9d81ec6f4..6fa421b74f 100644 --- a/src/lib/libcrypto/man/X509_LOOKUP_new.3 +++ b/src/lib/libcrypto/man/X509_LOOKUP_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_LOOKUP_new.3,v 1.6 2021/11/05 22:03:25 tb Exp $ | 1 | .\" $OpenBSD: X509_LOOKUP_new.3,v 1.7 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | .\" | 2 | .\" | 
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 
| 4 | .\" | 4 | .\" | 
| @@ -14,7 +14,7 @@ | |||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 
| 16 | .\" | 16 | .\" | 
| 17 | .Dd $Mdocdate: November 5 2021 $ | 17 | .Dd $Mdocdate: November 9 2021 $ | 
| 18 | .Dt X509_LOOKUP_NEW 3 | 18 | .Dt X509_LOOKUP_NEW 3 | 
| 19 | .Os | 19 | .Os | 
| 20 | .Sh NAME | 20 | .Sh NAME | 
| @@ -533,6 +533,7 @@ causes failure but provides no diagnostics. | |||
| 533 | .Xr d2i_X509_bio 3 , | 533 | .Xr d2i_X509_bio 3 , | 
| 534 | .Xr PEM_read_bio_X509_AUX 3 , | 534 | .Xr PEM_read_bio_X509_AUX 3 , | 
| 535 | .Xr PEM_X509_INFO_read_bio 3 , | 535 | .Xr PEM_X509_INFO_read_bio 3 , | 
| 536 | .Xr X509_load_cert_file 3 , | ||
| 536 | .Xr X509_LOOKUP_hash_dir 3 , | 537 | .Xr X509_LOOKUP_hash_dir 3 , | 
| 537 | .Xr X509_NAME_hash 3 , | 538 | .Xr X509_NAME_hash 3 , | 
| 538 | .Xr X509_NAME_new 3 , | 539 | .Xr X509_NAME_new 3 , | 
| diff --git a/src/lib/libcrypto/man/X509_STORE_load_locations.3 b/src/lib/libcrypto/man/X509_STORE_load_locations.3 index 4dbfb5fce4..66d8950737 100644 --- a/src/lib/libcrypto/man/X509_STORE_load_locations.3 +++ b/src/lib/libcrypto/man/X509_STORE_load_locations.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_STORE_load_locations.3,v 1.8 2021/08/01 15:37:53 schwarze Exp $ | 1 | .\" $OpenBSD: X509_STORE_load_locations.3,v 1.9 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | .\" full merge up to: | 2 | .\" full merge up to: | 
| 3 | .\" OpenSSL X509_STORE_add_cert b0edda11 Mar 20 13:00:17 2018 +0000 | 3 | .\" OpenSSL X509_STORE_add_cert b0edda11 Mar 20 13:00:17 2018 +0000 | 
| 4 | .\" | 4 | .\" | 
| @@ -16,7 +16,7 @@ | |||
| 16 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 16 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 
| 17 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 17 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 
| 18 | .\" | 18 | .\" | 
| 19 | .Dd $Mdocdate: August 1 2021 $ | 19 | .Dd $Mdocdate: November 9 2021 $ | 
| 20 | .Dt X509_STORE_LOAD_LOCATIONS 3 | 20 | .Dt X509_STORE_LOAD_LOCATIONS 3 | 
| 21 | .Os | 21 | .Os | 
| 22 | .Sh NAME | 22 | .Sh NAME | 
| @@ -162,6 +162,7 @@ default directory for | |||
| 162 | .El | 162 | .El | 
| 163 | .Sh SEE ALSO | 163 | .Sh SEE ALSO | 
| 164 | .Xr SSL_CTX_load_verify_locations 3 , | 164 | .Xr SSL_CTX_load_verify_locations 3 , | 
| 165 | .Xr X509_load_cert_file 3 , | ||
| 165 | .Xr X509_LOOKUP_hash_dir 3 , | 166 | .Xr X509_LOOKUP_hash_dir 3 , | 
| 166 | .Xr X509_LOOKUP_new 3 , | 167 | .Xr X509_LOOKUP_new 3 , | 
| 167 | .Xr X509_STORE_new 3 , | 168 | .Xr X509_STORE_new 3 , | 
| diff --git a/src/lib/libcrypto/man/X509_STORE_new.3 b/src/lib/libcrypto/man/X509_STORE_new.3 index 71b88f999d..c84be75cbb 100644 --- a/src/lib/libcrypto/man/X509_STORE_new.3 +++ b/src/lib/libcrypto/man/X509_STORE_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_STORE_new.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $ | 1 | .\" $OpenBSD: X509_STORE_new.3,v 1.6 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | .\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | 2 | .\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | 
| 3 | .\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 3 | .\" selective merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 
| 4 | .\" | 4 | .\" | 
| @@ -67,7 +67,7 @@ | |||
| 67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 67 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 
| 68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 68 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 69 | .\" | 69 | .\" | 
| 70 | .Dd $Mdocdate: June 6 2019 $ | 70 | .Dd $Mdocdate: November 9 2021 $ | 
| 71 | .Dt X509_STORE_NEW 3 | 71 | .Dt X509_STORE_NEW 3 | 
| 72 | .Os | 72 | .Os | 
| 73 | .Sh NAME | 73 | .Sh NAME | 
| @@ -124,6 +124,7 @@ returns 1 for success and 0 for failure. | |||
| 124 | .Sh SEE ALSO | 124 | .Sh SEE ALSO | 
| 125 | .Xr PKCS7_verify 3 , | 125 | .Xr PKCS7_verify 3 , | 
| 126 | .Xr SSL_CTX_set_cert_store 3 , | 126 | .Xr SSL_CTX_set_cert_store 3 , | 
| 127 | .Xr X509_load_cert_file 3 , | ||
| 127 | .Xr X509_LOOKUP_hash_dir 3 , | 128 | .Xr X509_LOOKUP_hash_dir 3 , | 
| 128 | .Xr X509_OBJECT_get0_X509 3 , | 129 | .Xr X509_OBJECT_get0_X509 3 , | 
| 129 | .Xr X509_STORE_CTX_new 3 , | 130 | .Xr X509_STORE_CTX_new 3 , | 
| diff --git a/src/lib/libcrypto/man/X509_load_cert_file.3 b/src/lib/libcrypto/man/X509_load_cert_file.3 new file mode 100644 index 0000000000..95a83dd00e --- /dev/null +++ b/src/lib/libcrypto/man/X509_load_cert_file.3 | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | .\" $OpenBSD: X509_load_cert_file.3,v 1.1 2021/11/09 16:23:04 schwarze Exp $ | ||
| 2 | .\" | ||
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
| 4 | .\" | ||
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | ||
| 6 | .\" purpose with or without fee is hereby granted, provided that the above | ||
| 7 | .\" copyright notice and this permission notice appear in all copies. | ||
| 8 | .\" | ||
| 9 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | .\" | ||
| 17 | .Dd $Mdocdate: November 9 2021 $ | ||
| 18 | .Dt X509_LOAD_CERT_FILE 3 | ||
| 19 | .Os | ||
| 20 | .Sh NAME | ||
| 21 | .Nm X509_load_cert_file , | ||
| 22 | .Nm X509_load_crl_file , | ||
| 23 | .Nm X509_load_cert_crl_file | ||
| 24 | .Nd read, decode, and cache certificates and CRLs | ||
| 25 | .Sh SYNOPSIS | ||
| 26 | .In openssl/x509_vfy.h | ||
| 27 | .Ft int | ||
| 28 | .Fo X509_load_cert_file | ||
| 29 | .Fa "X509_LOOKUP *ctx" | ||
| 30 | .Fa "const char *file" | ||
| 31 | .Fa "int type" | ||
| 32 | .Fc | ||
| 33 | .Ft int | ||
| 34 | .Fo X509_load_crl_file | ||
| 35 | .Fa "X509_LOOKUP *ctx" | ||
| 36 | .Fa "const char *file" | ||
| 37 | .Fa "int type" | ||
| 38 | .Fc | ||
| 39 | .Ft int | ||
| 40 | .Fo X509_load_cert_crl_file | ||
| 41 | .Fa "X509_LOOKUP *ctx" | ||
| 42 | .Fa "const char *file" | ||
| 43 | .Fa "int type" | ||
| 44 | .Fc | ||
| 45 | .Sh DESCRIPTION | ||
| 46 | .Fn X509_load_cert_file | ||
| 47 | with a | ||
| 48 | .Fa type | ||
| 49 | of | ||
| 50 | .Dv X509_FILETYPE_PEM | ||
| 51 | reads one or more certificates in PEM format from the given | ||
| 52 | .Fa file | ||
| 53 | using | ||
| 54 | .Xr PEM_read_bio_X509_AUX 3 ; | ||
| 55 | with a type of | ||
| 56 | .Dv X509_FILETYPE_ASN1 , | ||
| 57 | if reads one certificate in DER format using | ||
| 58 | .Xr d2i_X509_bio 3 . | ||
| 59 | The certificates read are added to the | ||
| 60 | .Vt X509_STORE | ||
| 61 | memory cache object associated with the given | ||
| 62 | .Fa ctx | ||
| 63 | using | ||
| 64 | .Xr X509_STORE_add_cert 3 . | ||
| 65 | .Pp | ||
| 66 | .Fn X509_load_crl_file | ||
| 67 | with a | ||
| 68 | .Fa type | ||
| 69 | of | ||
| 70 | .Dv X509_FILETYPE_PEM | ||
| 71 | reads one or more certificate revocation lists in PEM format from the given | ||
| 72 | .Fa file | ||
| 73 | using | ||
| 74 | .Xr PEM_read_bio_X509_CRL 3 ; | ||
| 75 | with a type of | ||
| 76 | .Dv X509_FILETYPE_ASN1 , | ||
| 77 | if reads one certificate revocation lists in DER format using | ||
| 78 | .Xr d2i_X509_CRL_bio 3 . | ||
| 79 | The certificate revocation lists read are added to the | ||
| 80 | .Vt X509_STORE | ||
| 81 | memory cache object associated with the given | ||
| 82 | .Fa ctx | ||
| 83 | using | ||
| 84 | .Xr X509_STORE_add_crl 3 . | ||
| 85 | .Pp | ||
| 86 | .Fn X509_load_cert_crl_file | ||
| 87 | with a | ||
| 88 | .Fa type | ||
| 89 | of | ||
| 90 | .Dv X509_FILETYPE_PEM | ||
| 91 | read one or more certificates and/or certificate revocation lists | ||
| 92 | in PEM format from the given | ||
| 93 | .Fa file | ||
| 94 | using | ||
| 95 | .Xr PEM_X509_INFO_read_bio 3 | ||
| 96 | and adds them to the | ||
| 97 | .Vt X509_STORE | ||
| 98 | memory cache object associated with the given | ||
| 99 | .Fa ctx | ||
| 100 | using | ||
| 101 | .Xr X509_STORE_add_cert 3 | ||
| 102 | and | ||
| 103 | .Xr X509_STORE_add_crl 3 , | ||
| 104 | respectively. | ||
| 105 | .Pp | ||
| 106 | .Fn X509_load_cert_crl_file | ||
| 107 | with a | ||
| 108 | .Fa type | ||
| 109 | of | ||
| 110 | .Dv X509_FILETYPE_ASN1 | ||
| 111 | is equivalent to | ||
| 112 | .Fn X509_load_cert_file | ||
| 113 | and cannot be used to read a certificate revocation list. | ||
| 114 | .Sh RETURN VALUES | ||
| 115 | These functions return the number of objects loaded or 0 on error. | ||
| 116 | .Sh SEE ALSO | ||
| 117 | .Xr d2i_X509_bio 3 , | ||
| 118 | .Xr PEM_read_PrivateKey 3 , | ||
| 119 | .Xr X509_LOOKUP_new 3 , | ||
| 120 | .Xr X509_OBJECT_get0_X509 3 , | ||
| 121 | .Xr X509_STORE_load_locations 3 , | ||
| 122 | .Xr X509_STORE_new 3 | ||
| 123 | .Sh HISTORY | ||
| 124 | .Fn X509_load_cert_file | ||
| 125 | first appeared in SSLeay 0.8.0 and | ||
| 126 | .Fn X509_load_crl_file | ||
| 127 | in SSLeay 0.9.0. | ||
| 128 | These functions have been available since | ||
| 129 | .Ox 2.4 . | ||
| 130 | .Pp | ||
| 131 | .Fn X509_load_cert_crl_file | ||
| 132 | first appeared in OpenSSL 0.9.5 and has been available since | ||
| 133 | .Ox 2.7 . | ||
| diff --git a/src/lib/libcrypto/man/X509_new.3 b/src/lib/libcrypto/man/X509_new.3 index 581c954c1a..296e9b8cfc 100644 --- a/src/lib/libcrypto/man/X509_new.3 +++ b/src/lib/libcrypto/man/X509_new.3 | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | .\" $OpenBSD: X509_new.3,v 1.34 2021/10/28 15:30:54 schwarze Exp $ | 1 | .\" $OpenBSD: X509_new.3,v 1.35 2021/11/09 16:23:04 schwarze Exp $ | 
| 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 2 | .\" full merge up to: OpenSSL 99d63d46 Oct 26 13:56:48 2016 -0400 | 
| 3 | .\" | 3 | .\" | 
| 4 | .\" This file is a derived work. | 4 | .\" This file is a derived work. | 
| @@ -66,7 +66,7 @@ | |||
| 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 
| 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 
| 68 | .\" | 68 | .\" | 
| 69 | .Dd $Mdocdate: October 28 2021 $ | 69 | .Dd $Mdocdate: November 9 2021 $ | 
| 70 | .Dt X509_NEW 3 | 70 | .Dt X509_NEW 3 | 
| 71 | .Os | 71 | .Os | 
| 72 | .Sh NAME | 72 | .Sh NAME | 
| @@ -223,6 +223,7 @@ if an error occurs. | |||
| 223 | .Xr X509_get_subject_name 3 , | 223 | .Xr X509_get_subject_name 3 , | 
| 224 | .Xr X509_get_version 3 , | 224 | .Xr X509_get_version 3 , | 
| 225 | .Xr X509_INFO_new 3 , | 225 | .Xr X509_INFO_new 3 , | 
| 226 | .Xr X509_load_cert_file 3 , | ||
| 226 | .Xr X509_LOOKUP_hash_dir 3 , | 227 | .Xr X509_LOOKUP_hash_dir 3 , | 
| 227 | .Xr X509_LOOKUP_new 3 , | 228 | .Xr X509_LOOKUP_new 3 , | 
| 228 | .Xr X509_NAME_new 3 , | 229 | .Xr X509_NAME_new 3 , | 
