Skip to content

Commit 3c55ea1

Browse files
author
schwarze
committed
document X509_STORE_CTX_get0_policy_tree(3)
and X509_STORE_CTX_get_explicit_policy(3)
1 parent 723eb0c commit 3c55ea1

File tree

1 file changed

+41
-4
lines changed

1 file changed

+41
-4
lines changed

src/lib/libcrypto/man/X509_STORE_CTX_get_error.3

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.16 2021/07/22 15:35:50 schwarze Exp $
1+
.\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.17 2021/07/28 14:48:09 schwarze Exp $
22
.\" full merge up to:
33
.\" OpenSSL crypto/X509_STORE_CTX_get_error f0e0fd51 Apr 14 23:59:26 2016 -0400
44
.\" selective merge up to:
@@ -70,7 +70,7 @@
7070
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
7171
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
7272
.\"
73-
.Dd $Mdocdate: July 22 2021 $
73+
.Dd $Mdocdate: July 28 2021 $
7474
.Dt X509_STORE_CTX_GET_ERROR 3
7575
.Os
7676
.Sh NAME
@@ -83,6 +83,8 @@
8383
.Nm X509_STORE_CTX_get0_chain ,
8484
.Nm X509_STORE_CTX_get_chain ,
8585
.Nm X509_STORE_CTX_get1_chain ,
86+
.Nm X509_STORE_CTX_get0_policy_tree ,
87+
.Nm X509_STORE_CTX_get_explicit_policy ,
8688
.Nm X509_verify_cert_error_string
8789
.Nd get or set certificate verification status information
8890
.Sh SYNOPSIS
@@ -124,15 +126,24 @@
124126
.Fo X509_STORE_CTX_get1_chain
125127
.Fa "X509_STORE_CTX *ctx"
126128
.Fc
129+
.Ft X509_POLICY_TREE *
130+
.Fo X509_STORE_CTX_get0_policy_tree
131+
.Fa "X509_STORE_CTX *ctx"
132+
.Fc
133+
.Ft int
134+
.Fo X509_STORE_CTX_get_explicit_policy
135+
.Fa "X509_STORE_CTX *ctx"
136+
.Fc
127137
.In openssl/x509.h
128138
.Ft const char *
129139
.Fo X509_verify_cert_error_string
130140
.Fa "long n"
131141
.Fc
132142
.Sh DESCRIPTION
133-
These functions are typically called after
143+
Most of these functions are typically called after
134144
.Xr X509_verify_cert 3
135-
has indicated an error or in a verification callback to determine the
145+
to inspect status information related to certificate verification.
146+
Some may also be called in a verification callback to determine the
136147
nature of an error.
137148
.Pp
138149
.Fn X509_STORE_CTX_get_error
@@ -238,6 +249,24 @@ return a pointer to a stack of certificates or
238249
.Dv NULL
239250
if an error occurs.
240251
.Pp
252+
.Fn X509_STORE_CTX_get0_policy_tree
253+
returns an internal pointer to the
254+
.Fa valid_policy_tree
255+
created by
256+
.Xr X509_policy_check 3
257+
or
258+
.Dv NULL
259+
if validation failed or the resulting tree was empty.
260+
.Pp
261+
.Fn X509_STORE_CTX_get_explicit_policy
262+
returns the
263+
.Pf * Fa pexplicit_policy
264+
output argument of
265+
.Xr X509_policy_check 3 .
266+
If validation succeeded, it is 1 if
267+
.Dv X509_V_FLAG_EXPLICIT_POLICY
268+
was requested or 0 otherwise.
269+
.Pp
241270
.Fn X509_verify_cert_error_string
242271
returns a human readable error string for verification error
243272
.Fa n .
@@ -412,6 +441,8 @@ An application specific error.
412441
This will never be returned unless explicitly set by an application.
413442
.El
414443
.Sh SEE ALSO
444+
.Xr X509_policy_check 3 ,
445+
.Xr X509_policy_tree_level_count 3 ,
415446
.Xr X509_STORE_CTX_new 3 ,
416447
.Xr X509_up_ref 3 ,
417448
.Xr X509_verify_cert 3
@@ -430,6 +461,12 @@ first appeared in SSLeay 0.8.0 and have been available since
430461
first appeared in OpenSSL 0.9.5 and has been available since
431462
.Ox 2.7 .
432463
.Pp
464+
.Fn X509_STORE_CTX_get0_policy_tree
465+
and
466+
.Fn X509_STORE_CTX_get_explicit_policy
467+
first appeared in OpenSSL 0.9.8 and have been available since
468+
.Ox 4.5 .
469+
.Pp
433470
.Fn X509_STORE_CTX_get0_current_issuer
434471
and
435472
.Fn X509_STORE_CTX_get0_current_crl

0 commit comments

Comments
 (0)