Skip to content

Commit 9cfe0ac

Browse files
author
schwarze
committed
document X509_STORE_CTX_get0_parent_ctx(3)
1 parent 08d3088 commit 9cfe0ac

File tree

1 file changed

+34
-4
lines changed

1 file changed

+34
-4
lines changed

src/lib/libcrypto/man/X509_STORE_CTX_get_error.3

Lines changed: 34 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.17 2021/07/28 14:48:09 schwarze Exp $
1+
.\" $OpenBSD: X509_STORE_CTX_get_error.3,v 1.18 2021/07/29 09:14:23 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 28 2021 $
73+
.Dd $Mdocdate: July 29 2021 $
7474
.Dt X509_STORE_CTX_GET_ERROR 3
7575
.Os
7676
.Sh NAME
@@ -80,6 +80,7 @@
8080
.Nm X509_STORE_CTX_get_current_cert ,
8181
.Nm X509_STORE_CTX_get0_current_issuer ,
8282
.Nm X509_STORE_CTX_get0_current_crl ,
83+
.Nm X509_STORE_CTX_get0_parent_ctx ,
8384
.Nm X509_STORE_CTX_get0_chain ,
8485
.Nm X509_STORE_CTX_get_chain ,
8586
.Nm X509_STORE_CTX_get1_chain ,
@@ -114,6 +115,10 @@
114115
.Fo X509_STORE_CTX_get0_current_crl
115116
.Fa "X509_STORE_CTX *ctx"
116117
.Fc
118+
.Ft X509_STORE_CTX *
119+
.Fo X509_STORE_CTX_get0_parent_ctx
120+
.Fa "X509_STORE_CTX *ctx"
121+
.Fc
117122
.Ft STACK_OF(X509) *
118123
.Fo X509_STORE_CTX_get0_chain
119124
.Fa "X509_STORE_CTX *ctx"
@@ -185,6 +190,22 @@ returns the certificate revocation list that caused CRL checking to fail or
185190
.Dv NULL
186191
if no CRL is relevant.
187192
.Pp
193+
When, during certification path validation, the need arises to check
194+
the validity of the certification path of a CRL issuer certificate,
195+
the library creates a new, temporary
196+
.Vt X509_STORE_CTX
197+
object.
198+
If
199+
.Fn X509_STORE_CTX_get0_parent_ctx
200+
is called on that temporary object, a pointer to the original
201+
certification path validation context is returned.
202+
This may be useful in callback functions called from
203+
.Xr X509_verify_cert 3
204+
or from its subroutines to find out whether the callback is called
205+
from the path validation of the target certificate or from the path
206+
validation of a related CRL issuer certificate, and if the latter,
207+
what the target certificate is.
208+
.Pp
188209
.Fn X509_STORE_CTX_get0_chain
189210
returns an internal pointer to a complete validate chain
190211
if a previous call to
@@ -241,6 +262,14 @@ return the object which caused the error or
241262
.Dv NULL
242263
if no object of the requested kind is relevant to the error.
243264
.Pp
265+
.Fn X509_STORE_CTX_get0_parent_ctx
266+
returns the parent context or
267+
.Dv NULL
268+
if
269+
.Fa ctx
270+
is not a temporary child context
271+
used for path validation of a CRL issuer certificate.
272+
.Pp
244273
.Fn X509_STORE_CTX_get0_chain ,
245274
.Fn X509_STORE_CTX_get_chain ,
246275
and
@@ -467,9 +496,10 @@ and
467496
first appeared in OpenSSL 0.9.8 and have been available since
468497
.Ox 4.5 .
469498
.Pp
470-
.Fn X509_STORE_CTX_get0_current_issuer
499+
.Fn X509_STORE_CTX_get0_current_issuer ,
500+
.Fn X509_STORE_CTX_get0_current_crl ,
471501
and
472-
.Fn X509_STORE_CTX_get0_current_crl
502+
.Fn X509_STORE_CTX_get0_parent_ctx
473503
first appeared in OpenSSL 1.0.0 and have been available since
474504
.Ox 4.9 .
475505
.Pp

0 commit comments

Comments
 (0)