Skip to content

Commit 08d3088

Browse files
author
schwarze
committed
document X509_STORE_CTX_set_app_data(3) and X509_STORE_CTX_get_app_data(3)
1 parent 3c55ea1 commit 08d3088

File tree

1 file changed

+51
-4
lines changed

1 file changed

+51
-4
lines changed

src/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3

Lines changed: 51 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $OpenBSD: X509_STORE_CTX_get_ex_new_index.3,v 1.5 2019/06/06 01:06:59 schwarze Exp $
1+
.\" $OpenBSD: X509_STORE_CTX_get_ex_new_index.3,v 1.6 2021/07/29 08:32:13 schwarze Exp $
22
.\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400
33
.\"
44
.\" This file was written by Dr. Stephen Henson <steve@openssl.org>.
@@ -48,13 +48,15 @@
4848
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
4949
.\" OF THE POSSIBILITY OF SUCH DAMAGE.
5050
.\"
51-
.Dd $Mdocdate: June 6 2019 $
51+
.Dd $Mdocdate: July 29 2021 $
5252
.Dt X509_STORE_CTX_GET_EX_NEW_INDEX 3
5353
.Os
5454
.Sh NAME
5555
.Nm X509_STORE_CTX_get_ex_new_index ,
5656
.Nm X509_STORE_CTX_set_ex_data ,
57-
.Nm X509_STORE_CTX_get_ex_data
57+
.Nm X509_STORE_CTX_get_ex_data ,
58+
.Nm X509_STORE_CTX_set_app_data ,
59+
.Nm X509_STORE_CTX_get_app_data
5860
.Nd add application specific data to X509_STORE_CTX structures
5961
.Sh SYNOPSIS
6062
.In openssl/x509_vfy.h
@@ -77,6 +79,15 @@
7779
.Fa "X509_STORE_CTX *d"
7880
.Fa "int idx"
7981
.Fc
82+
.Ft int
83+
.Fo X509_STORE_CTX_set_app_data
84+
.Fa "X509_STORE_CTX *d"
85+
.Fa "void *arg"
86+
.Fc
87+
.Ft void *
88+
.Fo X509_STORE_CTX_get_app_data
89+
.Fa "X509_STORE_CTX *d"
90+
.Fc
8091
.Sh DESCRIPTION
8192
These functions handle application specific data in
8293
.Vt X509_STORE_CTX
@@ -94,13 +105,49 @@ library to store the
94105
structure associated with a verification operation in an
95106
.Vt X509_STORE_CTX
96107
structure.
108+
.Pp
109+
.Fn X509_STORE_CTX_set_app_data
110+
and
111+
.Fn X509_STORE_CTX_get_app_data
112+
are macros calling
113+
.Fn X509_STORE_CTX_set_ex_data
114+
and
115+
.Fn X509_STORE_CTX_get_ex_data ,
116+
respectively, with an
117+
.Fa idx
118+
of 0.
119+
.Sh RETURN VALUES
120+
.Fn X509_STORE_CTX_get_ex_new_index
121+
returns a new index or \-1 on failure.
122+
.Pp
123+
.Fn X509_STORE_CTX_set_ex_data
124+
and
125+
.Fn X509_STORE_CTX_set_app_data
126+
return 1 on success or 0 on failure.
127+
.Pp
128+
.Fn X509_STORE_CTX_get_ex_data
129+
and
130+
.Fn X509_STORE_CTX_get_app_data
131+
return the application data or
132+
.Dv NULL
133+
on failure.
134+
.Dv NULL
135+
may also be valid application data, but currently these functions
136+
can only fail if given an invalid
137+
.Fa idx
138+
argument.
97139
.Sh SEE ALSO
98140
.Xr RSA_get_ex_new_index 3 ,
99141
.Xr X509_STORE_CTX_new 3
100142
.Sh HISTORY
143+
.Fn X509_STORE_CTX_set_app_data
144+
and
145+
.Fn X509_STORE_CTX_get_app_data
146+
first appeared in SSLeay 0.8.0 and
101147
.Fn X509_STORE_CTX_get_ex_new_index ,
102148
.Fn X509_STORE_CTX_set_ex_data ,
103149
and
104150
.Fn X509_STORE_CTX_get_ex_data
105-
first appeared in SSLeay 0.9.0 and have been available since
151+
in SSLeay 0.9.0.
152+
All these functions have been available since
106153
.Ox 2.4 .

0 commit comments

Comments
 (0)