summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2021-07-30 15:01:40 +0000
committerschwarze <>2021-07-30 15:01:40 +0000
commitf9d12ac132435716ba1d1886ac306596071b29e0 (patch)
treef62b313175ae7b76e216fe44b028e031884d6034 /src/lib
parent83cd735c2e833bc9c4575ab3849251b6e849c4a0 (diff)
downloadopenbsd-f9d12ac132435716ba1d1886ac306596071b29e0.tar.gz
openbsd-f9d12ac132435716ba1d1886ac306596071b29e0.tar.bz2
openbsd-f9d12ac132435716ba1d1886ac306596071b29e0.zip
Move the explanations related to *ptree closer together and correct
the lie that *ptree is set upon success - in some cases of success, it is set to NULL, whereas in some cases of failure, a non-trivial tree may be returned. beck@ pointed out that statements related to *ptree were scattered all over the place, and this patch works for him.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/X509_policy_check.335
1 files changed, 19 insertions, 16 deletions
diff --git a/src/lib/libcrypto/man/X509_policy_check.3 b/src/lib/libcrypto/man/X509_policy_check.3
index 445f22ddea..e4b3be0d43 100644
--- a/src/lib/libcrypto/man/X509_policy_check.3
+++ b/src/lib/libcrypto/man/X509_policy_check.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: X509_policy_check.3,v 1.4 2021/07/29 12:39:47 schwarze Exp $ 1.\" $OpenBSD: X509_policy_check.3,v 1.5 2021/07/30 15:01:40 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: July 29 2021 $ 17.Dd $Mdocdate: July 30 2021 $
18.Dt X509_POLICY_CHECK 3 18.Dt X509_POLICY_CHECK 3
19.Os 19.Os
20.Sh NAME 20.Sh NAME
@@ -44,9 +44,6 @@ The
44input argument contains the prospective certification path 44input argument contains the prospective certification path
45according to RFC 5280 paragraph 6.1.1(a), starting with the 45according to RFC 5280 paragraph 6.1.1(a), starting with the
46target certificate and ending with the trust anchor. 46target certificate and ending with the trust anchor.
47If a policy tree is returned, the reference count of each of the
48.Fa certs
49is incremented by 1.
50.Pp 47.Pp
51The 48The
52.Fa policy_oids 49.Fa policy_oids
@@ -79,7 +76,14 @@ as defined by RFC 5280 paragraph 6.1.1(e).
79It disables policy mapping in the certification path. 76It disables policy mapping in the certification path.
80.El 77.El
81.Pp 78.Pp
82Upon success, a pointer to the 79Upon success and in some cases of failure, the storage location pointed to by
80.Fa pexplicit_policy
81is set to 1 if
82.Dv X509_V_FLAG_EXPLICIT_POLICY
83was requested.
84Otherwise, it is set to 0.
85.Pp
86In many cases of success and in a few cases of failure, a pointer to the
83.Vt valid_policy_tree 87.Vt valid_policy_tree
84output value mentioned in RFC 5280 section 6.1.6 is returned in 88output value mentioned in RFC 5280 section 6.1.6 is returned in
85.Pf * Fa ptree . 89.Pf * Fa ptree .
@@ -94,23 +98,22 @@ of
94and an empty 98and an empty
95.Fa qualifier_set . 99.Fa qualifier_set .
96.Pp 100.Pp
97Upon success and in some cases of failure, the storage location pointed to by 101If a policy tree is returned, the reference count of each of the
98.Fa pexplicit_policy 102.Fa certs
99is set to 1 if 103is incremented by 1.
100.Dv X509_V_FLAG_EXPLICIT_POLICY 104In that case, the caller is responsible for calling
101was requested.
102Otherwise, it is set to 0.
103.Pp
104.Fn X509_policy_tree_free 105.Fn X509_policy_tree_free
105releases all memory used by the 106to release all memory used by the
106.Fa tree 107.Fa tree
107and decrements the reference counts 108and to decrement the reference counts
108of the certificates referenced from it by 1. 109of the certificates referenced from it by 1.
109If 110If
110.Fa tree 111.Fa tree
111is a 112is a
112.Dv NULL 113.Dv NULL
113pointer, no action occurs. 114pointer,
115.Fn X509_policy_tree_free
116has no effect.
114.Sh RETURN VALUES 117.Sh RETURN VALUES
115.Fn X509_policy_check 118.Fn X509_policy_check
116returns these values: 119returns these values: