diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/man/X509_STORE_get_by_subject.3 | 77 |
1 files changed, 51 insertions, 26 deletions
diff --git a/src/lib/libcrypto/man/X509_STORE_get_by_subject.3 b/src/lib/libcrypto/man/X509_STORE_get_by_subject.3 index 6c8b8f8b5e..3fb6c1c251 100644 --- a/src/lib/libcrypto/man/X509_STORE_get_by_subject.3 +++ b/src/lib/libcrypto/man/X509_STORE_get_by_subject.3 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | .\" $OpenBSD: X509_STORE_get_by_subject.3,v 1.3 2021/11/12 14:05:28 schwarze Exp $ | 1 | .\" $OpenBSD: X509_STORE_get_by_subject.3,v 1.4 2023/08/10 14:15:16 schwarze Exp $ |
| 2 | .\" | 2 | .\" |
| 3 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2021, 2023 Ingo Schwarze <schwarze@openbsd.org> |
| 4 | .\" | 4 | .\" |
| 5 | .\" Permission to use, copy, modify, and distribute this software for any | 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 | 6 | .\" purpose with or without fee is hereby granted, provided that the above |
| @@ -14,16 +14,18 @@ | |||
| 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 12 2021 $ | 17 | .Dd $Mdocdate: August 10 2023 $ |
| 18 | .Dt X509_STORE_GET_BY_SUBJECT 3 | 18 | .Dt X509_STORE_GET_BY_SUBJECT 3 |
| 19 | .Os | 19 | .Os |
| 20 | .Sh NAME | 20 | .Sh NAME |
| 21 | .Nm X509_STORE_CTX_get_by_subject , | 21 | .Nm X509_STORE_CTX_get_by_subject , |
| 22 | .Nm X509_STORE_CTX_get_obj_by_subject , | 22 | .Nm X509_STORE_CTX_get_obj_by_subject , |
| 23 | .Nm X509_STORE_CTX_get1_certs , | ||
| 24 | .Nm X509_STORE_CTX_get1_crls , | ||
| 25 | .Nm X509_STORE_CTX_get1_issuer , | ||
| 23 | .Nm X509_STORE_get_by_subject , | 26 | .Nm X509_STORE_get_by_subject , |
| 24 | .Nm X509_STORE_get1_certs , | 27 | .Nm X509_STORE_get1_certs , |
| 25 | .Nm X509_STORE_get1_crls , | 28 | .Nm X509_STORE_get1_crls |
| 26 | .Nm X509_STORE_CTX_get1_issuer | ||
| 27 | .Nd retrieve objects from a certificate store | 29 | .Nd retrieve objects from a certificate store |
| 28 | .Sh SYNOPSIS | 30 | .Sh SYNOPSIS |
| 29 | .In openssl/x509_vfy.h | 31 | .In openssl/x509_vfy.h |
| @@ -40,6 +42,22 @@ | |||
| 40 | .Fa "X509_LOOKUP_TYPE type" | 42 | .Fa "X509_LOOKUP_TYPE type" |
| 41 | .Fa "X509_NAME *name" | 43 | .Fa "X509_NAME *name" |
| 42 | .Fc | 44 | .Fc |
| 45 | .Ft STACK_OF(X509) * | ||
| 46 | .Fo X509_STORE_CTX_get1_certs | ||
| 47 | .Fa "X509_STORE_CTX *ctx" | ||
| 48 | .Fa "X509_NAME *name" | ||
| 49 | .Fc | ||
| 50 | .Ft STACK_OF(X509_CRL) * | ||
| 51 | .Fo X509_STORE_CTX_get1_crls | ||
| 52 | .Fa "X509_STORE_CTX *ctx" | ||
| 53 | .Fa "X509_NAME *name" | ||
| 54 | .Fc | ||
| 55 | .Ft int | ||
| 56 | .Fo X509_STORE_CTX_get1_issuer | ||
| 57 | .Fa "X509 **issuer" | ||
| 58 | .Fa "X509_STORE_CTX *ctx" | ||
| 59 | .Fa "X509 *certificate" | ||
| 60 | .Fc | ||
| 43 | .Ft int | 61 | .Ft int |
| 44 | .Fo X509_STORE_get_by_subject | 62 | .Fo X509_STORE_get_by_subject |
| 45 | .Fa "X509_STORE_CTX *ctx" | 63 | .Fa "X509_STORE_CTX *ctx" |
| @@ -57,12 +75,6 @@ | |||
| 57 | .Fa "X509_STORE_CTX *ctx" | 75 | .Fa "X509_STORE_CTX *ctx" |
| 58 | .Fa "X509_NAME *name" | 76 | .Fa "X509_NAME *name" |
| 59 | .Fc | 77 | .Fc |
| 60 | .Ft int | ||
| 61 | .Fo X509_STORE_CTX_get1_issuer | ||
| 62 | .Fa "X509 **issuer" | ||
| 63 | .Fa "X509_STORE_CTX *ctx" | ||
| 64 | .Fa "X509 *certificate" | ||
| 65 | .Fc | ||
| 66 | .Sh DESCRIPTION | 78 | .Sh DESCRIPTION |
| 67 | .Fn X509_STORE_CTX_get_by_subject | 79 | .Fn X509_STORE_CTX_get_by_subject |
| 68 | retrieves the first object having a matching | 80 | retrieves the first object having a matching |
| @@ -101,11 +113,7 @@ is empty is the responsibility of the caller. | |||
| 101 | .Fn X509_STORE_CTX_get_obj_by_subject | 113 | .Fn X509_STORE_CTX_get_obj_by_subject |
| 102 | is similar except that a new object is allocated and returned. | 114 | is similar except that a new object is allocated and returned. |
| 103 | .Pp | 115 | .Pp |
| 104 | .Fn X509_STORE_get_by_subject | 116 | .Fn X509_STORE_CTX_get1_certs |
| 105 | is a deprecated alias for | ||
| 106 | .Fn X509_STORE_CTX_get_by_subject . | ||
| 107 | .Pp | ||
| 108 | .Fn X509_STORE_get1_certs | ||
| 109 | retrieves all certificates matching the subject | 117 | retrieves all certificates matching the subject |
| 110 | .Vt name | 118 | .Vt name |
| 111 | from the | 119 | from the |
| @@ -113,15 +121,15 @@ from the | |||
| 113 | associated with | 121 | associated with |
| 114 | .Fa ctx . | 122 | .Fa ctx . |
| 115 | If there are none yet, | 123 | If there are none yet, |
| 116 | .Fn X509_STORE_get_by_subject | 124 | .Fn X509_STORE_CTX_get_by_subject |
| 117 | is called to try and add some. | 125 | is called to try and add some. |
| 118 | In case of success, the reference counts of all certificates | 126 | In case of success, the reference counts of all certificates |
| 119 | added to the returned array are incremented by 1. | 127 | added to the returned array are incremented by 1. |
| 120 | .Pp | 128 | .Pp |
| 121 | .Fn X509_STORE_get1_crls | 129 | .Fn X509_STORE_CTX_get1_crls |
| 122 | is similar except that it operates on certificate revocation lists | 130 | is similar except that it operates on certificate revocation lists |
| 123 | rather than on certificates and that it always calls | 131 | rather than on certificates and that it always calls |
| 124 | .Fn X509_STORE_get_by_subject , | 132 | .Fn X509_STORE_CTX_get_by_subject , |
| 125 | even if the | 133 | even if the |
| 126 | .Vt X509_STORE | 134 | .Vt X509_STORE |
| 127 | already contains a matching revocation list. | 135 | already contains a matching revocation list. |
| @@ -138,7 +146,7 @@ associated with | |||
| 138 | Internally, the issuer name is retrieved with | 146 | Internally, the issuer name is retrieved with |
| 139 | .Xr X509_get_issuer_name 3 | 147 | .Xr X509_get_issuer_name 3 |
| 140 | and the candidate issuer CA certificate with | 148 | and the candidate issuer CA certificate with |
| 141 | .Fn X509_STORE_get_by_subject | 149 | .Fn X509_STORE_X509_get_by_subject |
| 142 | using that issuer name. | 150 | using that issuer name. |
| 143 | .Xr X509_check_issued 3 | 151 | .Xr X509_check_issued 3 |
| 144 | or a user-supplied replacement function is used to check whether the | 152 | or a user-supplied replacement function is used to check whether the |
| @@ -151,6 +159,13 @@ If verification parameters associated with | |||
| 151 | encourage checking of validity times, CAs with a valid time are | 159 | encourage checking of validity times, CAs with a valid time are |
| 152 | preferred, but if no matching CA has a valid time, one with an | 160 | preferred, but if no matching CA has a valid time, one with an |
| 153 | invalid time is accepted anyway. | 161 | invalid time is accepted anyway. |
| 162 | .Pp | ||
| 163 | The following are deprecated aliases: | ||
| 164 | .Bl -column X509_STORE_get_by_subject F X509_STORE_CTX_get_by_subject | ||
| 165 | .It Fn X509_STORE_get_by_subject Ta for Ta Fn X509_STORE_CTX_get_by_subject | ||
| 166 | .It Fn X509_STORE_get1_certs Ta for Ta Fn X509_STORE_CTX_get1_certs | ||
| 167 | .It Fn X509_STORE_get1_crls Ta for Ta Fn X509_STORE_CTX_get1_crls | ||
| 168 | .El | ||
| 154 | .Sh RETURN VALUES | 169 | .Sh RETURN VALUES |
| 155 | .Fn X509_STORE_CTX_get_by_subject | 170 | .Fn X509_STORE_CTX_get_by_subject |
| 156 | and | 171 | and |
| @@ -167,20 +182,24 @@ returns the new object or | |||
| 167 | .Dv NULL | 182 | .Dv NULL |
| 168 | on failure, in particular if no match is found or memory allocation fails. | 183 | on failure, in particular if no match is found or memory allocation fails. |
| 169 | .Pp | 184 | .Pp |
| 185 | .Fn X509_STORE_CTX_get1_certs | ||
| 186 | and | ||
| 170 | .Fn X509_STORE_get1_certs | 187 | .Fn X509_STORE_get1_certs |
| 171 | returns a newly allocated and populated array of certificates or | 188 | return a newly allocated and populated array of certificates or |
| 172 | .Dv NULL | 189 | .Dv NULL |
| 173 | on failure. | 190 | on failure. |
| 174 | It fails if no match is found, if | 191 | They fail if no match is found, if |
| 175 | .Fn X509_STORE_get_by_subject | 192 | .Fn X509_STORE_CTX_get_by_subject |
| 176 | fails, or if memory allocation fails. | 193 | fails, or if memory allocation fails. |
| 177 | .Pp | 194 | .Pp |
| 195 | .Fn X509_STORE_CTX_get1_crls | ||
| 196 | and | ||
| 178 | .Fn X509_STORE_get1_crls | 197 | .Fn X509_STORE_get1_crls |
| 179 | returns a newly allocated and populated array of CRLs or | 198 | return a newly allocated and populated array of CRLs or |
| 180 | .Dv NULL | 199 | .Dv NULL |
| 181 | on failure. | 200 | on failure. |
| 182 | It fails if | 201 | They fail if |
| 183 | .Fn X509_STORE_get_by_subject | 202 | .Fn X509_STORE_CTX_get_by_subject |
| 184 | finds no new match, even if the associated | 203 | finds no new match, even if the associated |
| 185 | .Vt X509_STORE | 204 | .Vt X509_STORE |
| 186 | already contains matching CRLs, or if memory allocation fails. | 205 | already contains matching CRLs, or if memory allocation fails. |
| @@ -222,3 +241,9 @@ and | |||
| 222 | .Fn X509_STORE_CTX_get_obj_by_subject | 241 | .Fn X509_STORE_CTX_get_obj_by_subject |
| 223 | first appeared in OpenSSL 1.1.0 and have been available since | 242 | first appeared in OpenSSL 1.1.0 and have been available since |
| 224 | .Ox 7.1 . | 243 | .Ox 7.1 . |
| 244 | .Pp | ||
| 245 | .Fn X509_STORE_CTX_get1_certs | ||
| 246 | and | ||
| 247 | .Fn X509_STORE_CTX_get1_crls | ||
| 248 | first appeared in OpenSSL 1.1.0 and have been available since | ||
| 249 | .Ox 7.4 . | ||
