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 $
2
2
.\" full merge up to:
3
3
.\" OpenSSL crypto/X509_STORE_CTX_get_error f0e0fd51 Apr 14 23:59:26 2016 -0400
4
4
.\" selective merge up to:
70
70
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
71
71
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
72
72
.\"
73
- .Dd $Mdocdate : July 22 2021 $
73
+ .Dd $Mdocdate : July 28 2021 $
74
74
.Dt X509_STORE_CTX_GET_ERROR 3
75
75
.Os
76
76
.Sh NAME
83
83
.Nm X509_STORE_CTX_get0_chain ,
84
84
.Nm X509_STORE_CTX_get_chain ,
85
85
.Nm X509_STORE_CTX_get1_chain ,
86
+ .Nm X509_STORE_CTX_get0_policy_tree ,
87
+ .Nm X509_STORE_CTX_get_explicit_policy ,
86
88
.Nm X509_verify_cert_error_string
87
89
.Nd get or set certificate verification status information
88
90
.Sh SYNOPSIS
124
126
.Fo X509_STORE_CTX_get1_chain
125
127
.Fa " X509_STORE_CTX *ctx"
126
128
.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
127
137
.In openssl/x509.h
128
138
.Ft const char *
129
139
.Fo X509_verify_cert_error_string
130
140
.Fa " long n"
131
141
.Fc
132
142
.Sh DESCRIPTION
133
- These functions are typically called after
143
+ Most of these functions are typically called after
134
144
.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
136
147
nature of an error.
137
148
.Pp
138
149
.Fn X509_STORE_CTX_get_error
@@ -238,6 +249,24 @@ return a pointer to a stack of certificates or
238
249
.Dv NULL
239
250
if an error occurs.
240
251
.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
241
270
.Fn X509_verify_cert_error_string
242
271
returns a human readable error string for verification error
243
272
.Fa n .
@@ -412,6 +441,8 @@ An application specific error.
412
441
This will never be returned unless explicitly set by an application.
413
442
.El
414
443
.Sh SEE ALSO
444
+ .Xr X509_policy_check 3 ,
445
+ .Xr X509_policy_tree_level_count 3 ,
415
446
.Xr X509_STORE_CTX_new 3 ,
416
447
.Xr X509_up_ref 3 ,
417
448
.Xr X509_verify_cert 3
@@ -430,6 +461,12 @@ first appeared in SSLeay 0.8.0 and have been available since
430
461
first appeared in OpenSSL 0.9.5 and has been available since
431
462
.Ox 2.7 .
432
463
.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
433
470
.Fn X509_STORE_CTX_get0_current_issuer
434
471
and
435
472
.Fn X509_STORE_CTX_get0_current_crl
0 commit comments