diff options
-rw-r--r-- | src/lib/libcrypto/man/Makefile | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_STORE_CTX_get_error.3 | 40 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_check_purpose.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_check_trust.3 | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_new.3 | 6 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_policy_check.3 | 192 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_policy_tree_get0_policies.3 | 101 | ||||
-rw-r--r-- | src/lib/libcrypto/man/X509_policy_tree_level_count.3 | 178 |
9 files changed, 11 insertions, 527 deletions
diff --git a/src/lib/libcrypto/man/Makefile b/src/lib/libcrypto/man/Makefile index 3616c157d3..fc3204e3a2 100644 --- a/src/lib/libcrypto/man/Makefile +++ b/src/lib/libcrypto/man/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # $OpenBSD: Makefile,v 1.248 2023/04/27 09:43:55 tb Exp $ | 1 | # $OpenBSD: Makefile,v 1.249 2023/04/30 14:49:47 tb Exp $ |
2 | 2 | ||
3 | .include <bsd.own.mk> | 3 | .include <bsd.own.mk> |
4 | 4 | ||
@@ -377,9 +377,6 @@ MAN= \ | |||
377 | X509_load_cert_file.3 \ | 377 | X509_load_cert_file.3 \ |
378 | X509_new.3 \ | 378 | X509_new.3 \ |
379 | X509_ocspid_print.3 \ | 379 | X509_ocspid_print.3 \ |
380 | X509_policy_check.3 \ | ||
381 | X509_policy_tree_get0_policies.3 \ | ||
382 | X509_policy_tree_level_count.3 \ | ||
383 | X509_print_ex.3 \ | 380 | X509_print_ex.3 \ |
384 | X509_sign.3 \ | 381 | X509_sign.3 \ |
385 | X509_signature_dump.3 \ | 382 | X509_signature_dump.3 \ |
diff --git a/src/lib/libcrypto/man/X509_STORE_CTX_get_error.3 b/src/lib/libcrypto/man/X509_STORE_CTX_get_error.3 index 30e4024736..b3d0ee3069 100644 --- a/src/lib/libcrypto/man/X509_STORE_CTX_get_error.3 +++ b/src/lib/libcrypto/man/X509_STORE_CTX_get_error.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.26 2023/04/21 06:45:56 tb Exp $ | 1 | .\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.27 2023/04/30 14:49:47 tb Exp $ |
2 | .\" full merge up to: | 2 | .\" full merge up to: |
3 | .\" OpenSSL man3/X509_STORE_CTX_get_error 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" OpenSSL man3/X509_STORE_CTX_get_error 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" OpenSSL man3/X509_STORE_CTX_new 24a535ea Sep 22 13:14:20 2020 +0100 | 4 | .\" OpenSSL man3/X509_STORE_CTX_new 24a535ea Sep 22 13:14:20 2020 +0100 |
@@ -68,7 +68,7 @@ | |||
68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
70 | .\" | 70 | .\" |
71 | .Dd $Mdocdate: April 21 2023 $ | 71 | .Dd $Mdocdate: April 30 2023 $ |
72 | .Dt X509_STORE_CTX_GET_ERROR 3 | 72 | .Dt X509_STORE_CTX_GET_ERROR 3 |
73 | .Os | 73 | .Os |
74 | .Sh NAME | 74 | .Sh NAME |
@@ -86,8 +86,6 @@ | |||
86 | .Nm X509_STORE_CTX_get_chain , | 86 | .Nm X509_STORE_CTX_get_chain , |
87 | .Nm X509_STORE_CTX_get1_chain , | 87 | .Nm X509_STORE_CTX_get1_chain , |
88 | .Nm X509_STORE_CTX_set0_verified_chain , | 88 | .Nm X509_STORE_CTX_set0_verified_chain , |
89 | .Nm X509_STORE_CTX_get0_policy_tree , | ||
90 | .Nm X509_STORE_CTX_get_explicit_policy , | ||
91 | .Nm X509_verify_cert_error_string | 89 | .Nm X509_verify_cert_error_string |
92 | .Nd get or set certificate verification status information | 90 | .Nd get or set certificate verification status information |
93 | .Sh SYNOPSIS | 91 | .Sh SYNOPSIS |
@@ -152,14 +150,6 @@ | |||
152 | .Fa "X509_STORE_CTX *ctx" | 150 | .Fa "X509_STORE_CTX *ctx" |
153 | .Fa "STACK_OF(X509) *chain" | 151 | .Fa "STACK_OF(X509) *chain" |
154 | .Fc | 152 | .Fc |
155 | .Ft X509_POLICY_TREE * | ||
156 | .Fo X509_STORE_CTX_get0_policy_tree | ||
157 | .Fa "X509_STORE_CTX *ctx" | ||
158 | .Fc | ||
159 | .Ft int | ||
160 | .Fo X509_STORE_CTX_get_explicit_policy | ||
161 | .Fa "X509_STORE_CTX *ctx" | ||
162 | .Fc | ||
163 | .In openssl/x509.h | 153 | .In openssl/x509.h |
164 | .Ft const char * | 154 | .Ft const char * |
165 | .Fo X509_verify_cert_error_string | 155 | .Fo X509_verify_cert_error_string |
@@ -337,24 +327,6 @@ return a pointer to a stack of certificates or | |||
337 | .Dv NULL | 327 | .Dv NULL |
338 | if an error occurs. | 328 | if an error occurs. |
339 | .Pp | 329 | .Pp |
340 | .Fn X509_STORE_CTX_get0_policy_tree | ||
341 | returns an internal pointer to the | ||
342 | .Fa valid_policy_tree | ||
343 | created by | ||
344 | .Xr X509_policy_check 3 | ||
345 | or | ||
346 | .Dv NULL | ||
347 | if validation failed or the resulting tree was empty. | ||
348 | .Pp | ||
349 | .Fn X509_STORE_CTX_get_explicit_policy | ||
350 | returns the | ||
351 | .Pf * Fa pexplicit_policy | ||
352 | output argument of | ||
353 | .Xr X509_policy_check 3 . | ||
354 | If validation succeeded, it is 1 if | ||
355 | .Dv X509_V_FLAG_EXPLICIT_POLICY | ||
356 | was requested or 0 otherwise. | ||
357 | .Pp | ||
358 | .Fn X509_verify_cert_error_string | 330 | .Fn X509_verify_cert_error_string |
359 | returns a human readable error string for verification error | 331 | returns a human readable error string for verification error |
360 | .Fa n . | 332 | .Fa n . |
@@ -576,8 +548,6 @@ This will never be returned unless explicitly set by an application. | |||
576 | .\" No CA signature digest algorithm too weak | 548 | .\" No CA signature digest algorithm too weak |
577 | .El | 549 | .El |
578 | .Sh SEE ALSO | 550 | .Sh SEE ALSO |
579 | .Xr X509_policy_check 3 , | ||
580 | .Xr X509_policy_tree_level_count 3 , | ||
581 | .Xr X509_STORE_CTX_new 3 , | 551 | .Xr X509_STORE_CTX_new 3 , |
582 | .Xr X509_STORE_CTX_set_verify 3 , | 552 | .Xr X509_STORE_CTX_set_verify 3 , |
583 | .Xr X509_STORE_CTX_set_verify_cb 3 , | 553 | .Xr X509_STORE_CTX_set_verify_cb 3 , |
@@ -599,12 +569,6 @@ first appeared in SSLeay 0.8.0 and have been available since | |||
599 | first appeared in OpenSSL 0.9.5 and has been available since | 569 | first appeared in OpenSSL 0.9.5 and has been available since |
600 | .Ox 2.7 . | 570 | .Ox 2.7 . |
601 | .Pp | 571 | .Pp |
602 | .Fn X509_STORE_CTX_get0_policy_tree | ||
603 | and | ||
604 | .Fn X509_STORE_CTX_get_explicit_policy | ||
605 | first appeared in OpenSSL 0.9.8 and have been available since | ||
606 | .Ox 4.5 . | ||
607 | .Pp | ||
608 | .Fn X509_STORE_CTX_get0_current_issuer , | 572 | .Fn X509_STORE_CTX_get0_current_issuer , |
609 | .Fn X509_STORE_CTX_get0_current_crl , | 573 | .Fn X509_STORE_CTX_get0_current_crl , |
610 | and | 574 | and |
diff --git a/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 b/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 index 08961eb4d3..65e20f1ad8 100644 --- a/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 +++ b/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_VERIFY_PARAM_set_flags.3,v 1.27 2022/12/01 05:33:55 tb Exp $ | 1 | .\" $OpenBSD: X509_VERIFY_PARAM_set_flags.3,v 1.28 2023/04/30 14:49:47 tb Exp $ |
2 | .\" full merge up to: OpenSSL d33def66 Feb 9 14:17:13 2016 -0500 | 2 | .\" full merge up to: OpenSSL d33def66 Feb 9 14:17:13 2016 -0500 |
3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | 3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 |
4 | .\" | 4 | .\" |
@@ -68,7 +68,7 @@ | |||
68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 68 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 69 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
70 | .\" | 70 | .\" |
71 | .Dd $Mdocdate: December 1 2022 $ | 71 | .Dd $Mdocdate: April 30 2023 $ |
72 | .Dt X509_VERIFY_PARAM_SET_FLAGS 3 | 72 | .Dt X509_VERIFY_PARAM_SET_FLAGS 3 |
73 | .Os | 73 | .Os |
74 | .Sh NAME | 74 | .Sh NAME |
@@ -566,8 +566,6 @@ If | |||
566 | .Dv X509_V_FLAG_NOTIFY_POLICY | 566 | .Dv X509_V_FLAG_NOTIFY_POLICY |
567 | is set and policy checking is successful, a special status code is | 567 | is set and policy checking is successful, a special status code is |
568 | sent to the verification callback. | 568 | sent to the verification callback. |
569 | This permits it to examine the valid policy tree and perform additional | ||
570 | checks or simply log it for debugging purposes. | ||
571 | .Pp | 569 | .Pp |
572 | By default some additional features such as indirect CRLs and CRLs | 570 | By default some additional features such as indirect CRLs and CRLs |
573 | signed by different keys are disabled. | 571 | signed by different keys are disabled. |
diff --git a/src/lib/libcrypto/man/X509_check_purpose.3 b/src/lib/libcrypto/man/X509_check_purpose.3 index 611697fa30..6356081137 100644 --- a/src/lib/libcrypto/man/X509_check_purpose.3 +++ b/src/lib/libcrypto/man/X509_check_purpose.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_check_purpose.3,v 1.9 2022/12/17 12:48:53 tb Exp $ | 1 | .\" $OpenBSD: X509_check_purpose.3,v 1.10 2023/04/30 14:49:47 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2019, 2021 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2019, 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: December 17 2022 $ | 17 | .Dd $Mdocdate: April 30 2023 $ |
18 | .Dt X509_CHECK_PURPOSE 3 | 18 | .Dt X509_CHECK_PURPOSE 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -412,7 +412,6 @@ can be used as a CA for the | |||
412 | .Xr EXTENDED_KEY_USAGE_new 3 , | 412 | .Xr EXTENDED_KEY_USAGE_new 3 , |
413 | .Xr X509_check_trust 3 , | 413 | .Xr X509_check_trust 3 , |
414 | .Xr X509_new 3 , | 414 | .Xr X509_new 3 , |
415 | .Xr X509_policy_check 3 , | ||
416 | .Xr X509_PURPOSE_set 3 , | 415 | .Xr X509_PURPOSE_set 3 , |
417 | .Xr X509V3_get_d2i 3 , | 416 | .Xr X509V3_get_d2i 3 , |
418 | .Xr x509v3.cnf 5 | 417 | .Xr x509v3.cnf 5 |
diff --git a/src/lib/libcrypto/man/X509_check_trust.3 b/src/lib/libcrypto/man/X509_check_trust.3 index be4489e946..0f02a1b1ef 100644 --- a/src/lib/libcrypto/man/X509_check_trust.3 +++ b/src/lib/libcrypto/man/X509_check_trust.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: X509_check_trust.3,v 1.7 2022/12/26 07:18:52 jmc Exp $ | 1 | .\" $OpenBSD: X509_check_trust.3,v 1.8 2023/04/30 14:49:47 tb 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: December 26 2022 $ | 17 | .Dd $Mdocdate: April 30 2023 $ |
18 | .Dt X509_CHECK_TRUST 3 | 18 | .Dt X509_CHECK_TRUST 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -238,7 +238,6 @@ was never called before. | |||
238 | .Xr X509_CERT_AUX_new 3 , | 238 | .Xr X509_CERT_AUX_new 3 , |
239 | .Xr X509_check_purpose 3 , | 239 | .Xr X509_check_purpose 3 , |
240 | .Xr X509_new 3 , | 240 | .Xr X509_new 3 , |
241 | .Xr X509_policy_check 3 , | ||
242 | .Xr X509_TRUST_set 3 , | 241 | .Xr X509_TRUST_set 3 , |
243 | .Xr X509_VERIFY_PARAM_set_trust 3 | 242 | .Xr X509_VERIFY_PARAM_set_trust 3 |
244 | .Sh HISTORY | 243 | .Sh HISTORY |
diff --git a/src/lib/libcrypto/man/X509_new.3 b/src/lib/libcrypto/man/X509_new.3 index 4b85f67eb0..c38dfc00b1 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.36 2021/11/18 10:09:24 schwarze Exp $ | 1 | .\" $OpenBSD: X509_new.3,v 1.37 2023/04/30 14:49:47 tb 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: November 18 2021 $ | 69 | .Dd $Mdocdate: April 30 2023 $ |
70 | .Dt X509_NEW 3 | 70 | .Dt X509_NEW 3 |
71 | .Os | 71 | .Os |
72 | .Sh NAME | 72 | .Sh NAME |
@@ -229,8 +229,6 @@ if an error occurs. | |||
229 | .Xr X509_NAME_new 3 , | 229 | .Xr X509_NAME_new 3 , |
230 | .Xr X509_OBJECT_new 3 , | 230 | .Xr X509_OBJECT_new 3 , |
231 | .Xr X509_PKEY_new 3 , | 231 | .Xr X509_PKEY_new 3 , |
232 | .Xr X509_policy_check 3 , | ||
233 | .Xr X509_policy_tree_level_count 3 , | ||
234 | .Xr X509_print_ex 3 , | 232 | .Xr X509_print_ex 3 , |
235 | .Xr X509_PUBKEY_new 3 , | 233 | .Xr X509_PUBKEY_new 3 , |
236 | .Xr X509_PURPOSE_set 3 , | 234 | .Xr X509_PURPOSE_set 3 , |
diff --git a/src/lib/libcrypto/man/X509_policy_check.3 b/src/lib/libcrypto/man/X509_policy_check.3 deleted file mode 100644 index 5ea774a3ef..0000000000 --- a/src/lib/libcrypto/man/X509_policy_check.3 +++ /dev/null | |||
@@ -1,192 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_policy_check.3,v 1.6 2021/11/11 12:06:25 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 11 2021 $ | ||
18 | .Dt X509_POLICY_CHECK 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm X509_policy_check , | ||
22 | .Nm X509_policy_tree_free | ||
23 | .Nd construct X.509 valid policy tree | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/x509_vfy.h | ||
26 | .Ft int | ||
27 | .Fo X509_policy_check | ||
28 | .Fa "X509_POLICY_TREE **ptree" | ||
29 | .Fa "int *pexplicit_policy" | ||
30 | .Fa "STACK_OF(X509) *certs" | ||
31 | .Fa "STACK_OF(ASN1_OBJECT) *policy_oids" | ||
32 | .Fa "unsigned int flags" | ||
33 | .Fc | ||
34 | .Ft void | ||
35 | .Fn X509_policy_tree_free "X509_POLICY_TREE *tree" | ||
36 | .Sh DESCRIPTION | ||
37 | .Fn X509_policy_check | ||
38 | performs those parts of Basic Certification Path Validation | ||
39 | described in RFC 5280 section 6.1 that are related to the | ||
40 | construction of the valid policy tree. | ||
41 | .Pp | ||
42 | The | ||
43 | .Fa certs | ||
44 | input argument contains the prospective certification path | ||
45 | according to RFC 5280 paragraph 6.1.1(a), starting with the | ||
46 | target certificate and ending with the trust anchor. | ||
47 | .Pp | ||
48 | The | ||
49 | .Fa policy_oids | ||
50 | input argument contains the | ||
51 | .Va user-initial-policy-set | ||
52 | according to RFC 5280 section 6.1.1(c). | ||
53 | It specifies a set of certificate policies acceptable to the certificate user. | ||
54 | .Pp | ||
55 | The | ||
56 | .Fa flags | ||
57 | argument can contain zero or more of the following constants, OR'ed together: | ||
58 | .Bl -tag -width Ds | ||
59 | .It Dv X509_V_FLAG_EXPLICIT_POLICY | ||
60 | Set | ||
61 | .Va initial-explicit-policy | ||
62 | as defined by RFC 5280 paragraph 6.1.1(f). | ||
63 | It requires the path to be valid for at least one of the | ||
64 | .Fa policy_oids . | ||
65 | .It Dv X509_V_FLAG_INHIBIT_ANY | ||
66 | Set | ||
67 | .Va initial-any-policy-inhibit | ||
68 | as defined by RFC 5280 paragraph 6.1.1(g). | ||
69 | It causes the | ||
70 | .Sy anyPolicy | ||
71 | OID to be skipped if it is encountered in a certificate. | ||
72 | .It Dv X509_V_FLAG_INHIBIT_MAP | ||
73 | Set | ||
74 | .Va initial-policy-mapping-inhibit | ||
75 | as defined by RFC 5280 paragraph 6.1.1(e). | ||
76 | It disables policy mapping in the certification path. | ||
77 | .El | ||
78 | .Pp | ||
79 | Upon success and in some cases of failure, the storage location pointed to by | ||
80 | .Fa pexplicit_policy | ||
81 | is set to 1 if | ||
82 | .Dv X509_V_FLAG_EXPLICIT_POLICY | ||
83 | was requested. | ||
84 | Otherwise, it is set to 0. | ||
85 | .Pp | ||
86 | In many cases of success and in a few cases of failure, a pointer to the | ||
87 | .Vt valid_policy_tree | ||
88 | output value mentioned in RFC 5280 section 6.1.6 is returned in | ||
89 | .Pf * Fa ptree . | ||
90 | It contains one level for each of the | ||
91 | .Fa certs , | ||
92 | in reverse order: level 0 corresponds to the trust anchor, | ||
93 | the last level corresponds to the target certificate. | ||
94 | Level 0 is initialized to contain a single node with a | ||
95 | .Fa valid_policy | ||
96 | of | ||
97 | .Sy anyPolicy | ||
98 | and an empty | ||
99 | .Fa qualifier_set . | ||
100 | .Pp | ||
101 | If a policy tree is returned, the reference count of each of the | ||
102 | .Fa certs | ||
103 | is incremented by 1. | ||
104 | In that case, the caller is responsible for calling | ||
105 | .Fn X509_policy_tree_free | ||
106 | to release all memory used by the | ||
107 | .Fa tree | ||
108 | and to decrement the reference counts | ||
109 | of the certificates referenced from it by 1. | ||
110 | If | ||
111 | .Fa tree | ||
112 | is a | ||
113 | .Dv NULL | ||
114 | pointer, | ||
115 | .Fn X509_policy_tree_free | ||
116 | has no effect. | ||
117 | .Sh RETURN VALUES | ||
118 | .Fn X509_policy_check | ||
119 | returns these values: | ||
120 | .Bl -tag -width 2n | ||
121 | .It \-2 | ||
122 | Validation failed because | ||
123 | .Dv X509_V_FLAG_EXPLICIT_POLICY | ||
124 | was requested but the resulting policy tree | ||
125 | or the resulting user policy set would have been empty. | ||
126 | In this case, | ||
127 | .Pf * Fa pexplicit_policy | ||
128 | is set to 1. | ||
129 | If the resulting tree is empty, | ||
130 | .Pf * Fa ptree | ||
131 | is set to | ||
132 | .Dv NULL ; | ||
133 | otherwise, it is set to the resulting tree. | ||
134 | .It \-1 | ||
135 | At least one of the | ||
136 | .Fa certs | ||
137 | contains invalid or inconsistent extensions. | ||
138 | .Pf * Fa ptree | ||
139 | is set to | ||
140 | .Dv NULL | ||
141 | and | ||
142 | .Pf * Fa pexplicit_policy | ||
143 | to 0. | ||
144 | .It 0 | ||
145 | Internal error. | ||
146 | For example, setting up the policy caches failed, or memory allocation | ||
147 | failed while constructing the tree. | ||
148 | .Pf * Fa ptree | ||
149 | is set to | ||
150 | .Dv NULL | ||
151 | and | ||
152 | .Pf * Fa pexplicit_policy | ||
153 | may or may not be set. | ||
154 | .It 1 | ||
155 | Validation succeeded and | ||
156 | .Pf * Fa ptree | ||
157 | and | ||
158 | .Pf * Fa pexplicit_policy | ||
159 | have been set. | ||
160 | In the special cases that the | ||
161 | .Fa certs | ||
162 | argument contains exactly one certificate or that | ||
163 | .Dv X509_V_FLAG_EXPLICIT_POLICY | ||
164 | was not requested and at least one of the certificates contains no | ||
165 | certificate policies or the resulting policy tree would have been empty, | ||
166 | .Pf * Fa ptree | ||
167 | is set to | ||
168 | .Dv NULL | ||
169 | and | ||
170 | .Pf * Fa pexplicit_policy | ||
171 | to 0. | ||
172 | .El | ||
173 | .Sh SEE ALSO | ||
174 | .Xr ASN1_OBJECT_new 3 , | ||
175 | .Xr OBJ_nid2obj 3 , | ||
176 | .Xr STACK_OF 3 , | ||
177 | .Xr X509_check_purpose 3 , | ||
178 | .Xr X509_check_trust 3 , | ||
179 | .Xr X509_new 3 , | ||
180 | .Xr X509_policy_tree_get0_policies 3 , | ||
181 | .Xr X509_policy_tree_level_count 3 , | ||
182 | .Xr X509_verify_cert 3 | ||
183 | .Sh STANDARDS | ||
184 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate | ||
185 | and Certificate Revocation List (CRL) Profile, | ||
186 | section 6.1: Basic Path Validation | ||
187 | .Sh HISTORY | ||
188 | .Fn X509_policy_check | ||
189 | and | ||
190 | .Fn X509_policy_tree_free | ||
191 | first appeared in OpenSSL 0.9.8 and have been available since | ||
192 | .Ox 4.5 . | ||
diff --git a/src/lib/libcrypto/man/X509_policy_tree_get0_policies.3 b/src/lib/libcrypto/man/X509_policy_tree_get0_policies.3 deleted file mode 100644 index cb0715d6cb..0000000000 --- a/src/lib/libcrypto/man/X509_policy_tree_get0_policies.3 +++ /dev/null | |||
@@ -1,101 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_policy_tree_get0_policies.3,v 1.1 2021/11/11 12:06:25 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 11 2021 $ | ||
18 | .Dt X509_POLICY_TREE_GET0_POLICIES 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm X509_policy_tree_get0_policies , | ||
22 | .Nm X509_policy_tree_get0_user_policies | ||
23 | .Nd retrieve arrays of policy tree nodes | ||
24 | .Sh SYNOPSIS | ||
25 | .In openssl/x509_vfy.h | ||
26 | .Ft STACK_OF(X509_POLICY_NODE) * | ||
27 | .Fn X509_policy_tree_get0_policies "const X509_POLICY_TREE *tree" | ||
28 | .Ft STACK_OF(X509_POLICY_NODE) * | ||
29 | .Fn X509_policy_tree_get0_user_policies "const X509_POLICY_TREE *tree" | ||
30 | .Sh DESCRIPTION | ||
31 | The | ||
32 | .Em authority set | ||
33 | and the | ||
34 | .Em user set | ||
35 | are arrays of nodes from a policy | ||
36 | .Fa tree . | ||
37 | .Pp | ||
38 | If the last level of a | ||
39 | .Fa tree , | ||
40 | or equivalently, all levels of it, contain an | ||
41 | .Sy anyPolicy | ||
42 | node, the authority set contains | ||
43 | only this anyPolicy node from the last level. | ||
44 | Unless the array of | ||
45 | .Fa policy_oids | ||
46 | passed to | ||
47 | .Xr X509_policy_check 3 | ||
48 | contained an anyPolicy object, | ||
49 | the user set contains one node for each of the | ||
50 | .Fa policy_oids ; | ||
51 | specifically, the first matching node that is a child of an anyPolicy node. | ||
52 | .Pp | ||
53 | If the last level of the | ||
54 | .Fa tree | ||
55 | does not contain an | ||
56 | .Sy anyPolicy | ||
57 | node, the authority set contains | ||
58 | all non-anyPolicy nodes that are children of anyPolicy nodes. | ||
59 | For each element of the | ||
60 | .Fa policy_oids , | ||
61 | the user set contains the first node from the authority set | ||
62 | matching it, if any. | ||
63 | .Pp | ||
64 | These functions are intended to be called after | ||
65 | .Xr X509_policy_check 3 | ||
66 | was called either directly or indirectly through | ||
67 | .Xr X509_verify_cert 3 . | ||
68 | .Sh RETURN VALUES | ||
69 | .Fn X509_policy_tree_get0_policies | ||
70 | returns an internal pointer to the authority set | ||
71 | or | ||
72 | .Dv NULL | ||
73 | if the | ||
74 | .Fa tree | ||
75 | argument is | ||
76 | .Dv NULL . | ||
77 | .Pp | ||
78 | .Fn X509_policy_tree_get0_user_policies | ||
79 | returns an internal pointer to the user set or | ||
80 | .Dv NULL | ||
81 | if the | ||
82 | .Fa tree | ||
83 | argument is | ||
84 | .Dv NULL | ||
85 | or if the array of | ||
86 | .Fa policy_oids | ||
87 | passed to | ||
88 | .Xr X509_policy_check 3 | ||
89 | was empty or contained an anyPolicy object. | ||
90 | .Sh SEE ALSO | ||
91 | .Xr STACK_OF 3 , | ||
92 | .Xr X509_policy_check 3 , | ||
93 | .Xr X509_policy_level_get0_node 3 , | ||
94 | .Xr X509_STORE_CTX_get0_policy_tree 3 | ||
95 | .Sh STANDARDS | ||
96 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate | ||
97 | and Certificate Revocation List (CRL) Profile, | ||
98 | section 6.1: Basic Path Validation | ||
99 | .Sh HISTORY | ||
100 | These function first appeared in OpenSSL 0.9.8 and have been available since | ||
101 | .Ox 4.5 . | ||
diff --git a/src/lib/libcrypto/man/X509_policy_tree_level_count.3 b/src/lib/libcrypto/man/X509_policy_tree_level_count.3 deleted file mode 100644 index ff2036c40f..0000000000 --- a/src/lib/libcrypto/man/X509_policy_tree_level_count.3 +++ /dev/null | |||
@@ -1,178 +0,0 @@ | |||
1 | .\" $OpenBSD: X509_policy_tree_level_count.3,v 1.5 2022/09/10 08:50:53 jsg 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: September 10 2022 $ | ||
18 | .Dt X509_POLICY_TREE_LEVEL_COUNT 3 | ||
19 | .Os | ||
20 | .Sh NAME | ||
21 | .Nm X509_policy_tree_level_count , | ||
22 | .Nm X509_policy_tree_get0_level , | ||
23 | .Nm X509_policy_level_node_count , | ||
24 | .Nm X509_policy_level_get0_node , | ||
25 | .Nm X509_policy_node_get0_policy , | ||
26 | .Nm X509_policy_node_get0_qualifiers , | ||
27 | .Nm X509_policy_node_get0_parent | ||
28 | .Nd inspect X.509 policy tree objects | ||
29 | .Sh SYNOPSIS | ||
30 | .In openssl/x509_vfy.h | ||
31 | .Ft int | ||
32 | .Fn X509_policy_tree_level_count "const X509_POLICY_TREE *tree" | ||
33 | .Ft X509_POLICY_LEVEL * | ||
34 | .Fn X509_policy_tree_get0_level "const X509_POLICY_TREE *tree" "int index" | ||
35 | .Ft int | ||
36 | .Fn X509_policy_level_node_count "X509_POLICY_LEVEL *level" | ||
37 | .Ft X509_POLICY_NODE * | ||
38 | .Fn X509_policy_level_get0_node "X509_POLICY_LEVEL *level" "int index" | ||
39 | .Ft const ASN1_OBJECT * | ||
40 | .Fn X509_policy_node_get0_policy "const X509_POLICY_NODE *node" | ||
41 | .Ft STACK_OF(POLICYQUALINFO) * | ||
42 | .Fn X509_policy_node_get0_qualifiers "const X509_POLICY_NODE *node" | ||
43 | .Ft const X509_POLICY_NODE * | ||
44 | .Fn X509_policy_node_get0_parent "const X509_POLICY_NODE *node" | ||
45 | .Sh DESCRIPTION | ||
46 | The | ||
47 | .Vt X509_POLICY_TREE | ||
48 | object represents a | ||
49 | .Vt valid_policy_tree | ||
50 | as described in RFC 5280 section 6.1. | ||
51 | .Pp | ||
52 | The | ||
53 | .Vt X509_POLICY_LEVEL | ||
54 | object represents one level of such a tree, | ||
55 | corresponding to one certificate. | ||
56 | .Pp | ||
57 | The | ||
58 | .Vt X509_POLICY_NODE | ||
59 | object represents one node in the tree. | ||
60 | .Sh RETURN VALUES | ||
61 | .Fn X509_policy_tree_level_count | ||
62 | returns the number of levels in the | ||
63 | .Fa tree | ||
64 | or 0 if the | ||
65 | .Fa tree | ||
66 | argument is | ||
67 | .Dv NULL . | ||
68 | If it is not 0, it equals the number of certificates in the | ||
69 | certification path the tree was created from, including both | ||
70 | the target certificate and the trust anchor. | ||
71 | .Pp | ||
72 | .Fn X509_policy_tree_get0_level | ||
73 | returns an internal pointer to the level of the | ||
74 | .Fa tree | ||
75 | with the given | ||
76 | .Fa index | ||
77 | or | ||
78 | .Dv NULL | ||
79 | if the | ||
80 | .Fa tree | ||
81 | argument is | ||
82 | .Dv NULL | ||
83 | or the | ||
84 | .Fa index | ||
85 | is less than 0 or greater than or equal to the number of levels in the | ||
86 | .Fa tree . | ||
87 | An | ||
88 | .Fa index | ||
89 | of 0 corresponds to the trust anchor | ||
90 | and the last level corresponds to the target certificate. | ||
91 | .Pp | ||
92 | .Fn X509_policy_level_node_count | ||
93 | returns the number of nodes on the | ||
94 | .Fa level , | ||
95 | including an | ||
96 | .Sy anyPolicy | ||
97 | node if it is present, or 0 if the | ||
98 | .Fa level | ||
99 | argument is | ||
100 | .Dv NULL . | ||
101 | .Pp | ||
102 | .Fn X509_policy_level_get0_node | ||
103 | returns an internal pointer to the node on the | ||
104 | .Fa level | ||
105 | with the given | ||
106 | .Fa index | ||
107 | or | ||
108 | .Dv NULL | ||
109 | if the | ||
110 | .Fa level | ||
111 | argument is | ||
112 | .Dv NULL | ||
113 | or the | ||
114 | .Fa index | ||
115 | is less than 0 or greater than or equal to the number of nodes on the level. | ||
116 | If an | ||
117 | .Sy anyPolicy | ||
118 | node is present on the level, it can be retrieved by passing an | ||
119 | .Fa index | ||
120 | of 0. | ||
121 | .Pp | ||
122 | .Fn X509_policy_node_get0_policy | ||
123 | returns an internal pointer to the | ||
124 | .Fa valid_policy | ||
125 | child object of the node or | ||
126 | .Dv NULL | ||
127 | if the | ||
128 | .Fa node | ||
129 | argument is | ||
130 | .Dv NULL . | ||
131 | It represents a single policy that is valid for the path | ||
132 | from the trust anchor to the certificate corresponding | ||
133 | to the level containing the | ||
134 | .Fa node . | ||
135 | .Pp | ||
136 | .Fn X509_policy_node_get0_qualifiers | ||
137 | returns an internal pointer to the | ||
138 | .Fa qualifier_set | ||
139 | child object of the node or | ||
140 | .Dv NULL | ||
141 | if the | ||
142 | .Fa node | ||
143 | argument is | ||
144 | .Dv NULL . | ||
145 | It contains the policy qualifiers associated with the | ||
146 | .Fa valid_policy | ||
147 | of the | ||
148 | .Fa node | ||
149 | in the certificate corresponding to the level containing the | ||
150 | .Fa node . | ||
151 | .Pp | ||
152 | .Fn X509_policy_node_get0_parent | ||
153 | returns | ||
154 | .Dv NULL | ||
155 | if the | ||
156 | .Fa node | ||
157 | argument is | ||
158 | .Dv NULL | ||
159 | or located on level 0. | ||
160 | Otherwise, it returns an internal pointer to the parent node of the | ||
161 | .Fa node | ||
162 | argument. | ||
163 | The parent node is always located on the previous level. | ||
164 | .Sh SEE ALSO | ||
165 | .Xr ASN1_OBJECT_new 3 , | ||
166 | .Xr OBJ_obj2txt 3 , | ||
167 | .Xr POLICYQUALINFO_new 3 , | ||
168 | .Xr STACK_OF 3 , | ||
169 | .Xr X509_new 3 , | ||
170 | .Xr X509_policy_check 3 , | ||
171 | .Xr X509_policy_tree_get0_policies 3 | ||
172 | .Sh STANDARDS | ||
173 | RFC 5280: Internet X.509 Public Key Infrastructure Certificate | ||
174 | and Certificate Revocation List (CRL) Profile, | ||
175 | section 6.1: Basic Path Validation | ||
176 | .Sh HISTORY | ||
177 | These function first appeared in OpenSSL 0.9.8 and have been available since | ||
178 | .Ox 4.5 . | ||