]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - secure/lib/libcrypto/man/man7/ssl.7
Merge OpenSSL 1.1.1f.
[FreeBSD/FreeBSD.git] / secure / lib / libcrypto / man / man7 / ssl.7
1 .\" Automatically generated by Pod::Man 4.11 (Pod::Simple 3.40)
2 .\"
3 .\" Standard preamble:
4 .\" ========================================================================
5 .de Sp \" Vertical space (when we can't use .PP)
6 .if t .sp .5v
7 .if n .sp
8 ..
9 .de Vb \" Begin verbatim text
10 .ft CW
11 .nf
12 .ne \\$1
13 ..
14 .de Ve \" End verbatim text
15 .ft R
16 .fi
17 ..
18 .\" Set up some character translations and predefined strings.  \*(-- will
19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
23 .\" nothing in troff, for use with C<>.
24 .tr \(*W-
25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
26 .ie n \{\
27 .    ds -- \(*W-
28 .    ds PI pi
29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
31 .    ds L" ""
32 .    ds R" ""
33 .    ds C` ""
34 .    ds C' ""
35 'br\}
36 .el\{\
37 .    ds -- \|\(em\|
38 .    ds PI \(*p
39 .    ds L" ``
40 .    ds R" ''
41 .    ds C`
42 .    ds C'
43 'br\}
44 .\"
45 .\" Escape single quotes in literal strings from groff's Unicode transform.
46 .ie \n(.g .ds Aq \(aq
47 .el       .ds Aq '
48 .\"
49 .\" If the F register is >0, we'll generate index entries on stderr for
50 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
51 .\" entries marked with X<> in POD.  Of course, you'll have to process the
52 .\" output yourself in some meaningful fashion.
53 .\"
54 .\" Avoid warning from groff about undefined register 'F'.
55 .de IX
56 ..
57 .nr rF 0
58 .if \n(.g .if rF .nr rF 1
59 .if (\n(rF:(\n(.g==0)) \{\
60 .    if \nF \{\
61 .        de IX
62 .        tm Index:\\$1\t\\n%\t"\\$2"
63 ..
64 .        if !\nF==2 \{\
65 .            nr % 0
66 .            nr F 2
67 .        \}
68 .    \}
69 .\}
70 .rr rF
71 .\"
72 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
73 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
74 .    \" fudge factors for nroff and troff
75 .if n \{\
76 .    ds #H 0
77 .    ds #V .8m
78 .    ds #F .3m
79 .    ds #[ \f1
80 .    ds #] \fP
81 .\}
82 .if t \{\
83 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
84 .    ds #V .6m
85 .    ds #F 0
86 .    ds #[ \&
87 .    ds #] \&
88 .\}
89 .    \" simple accents for nroff and troff
90 .if n \{\
91 .    ds ' \&
92 .    ds ` \&
93 .    ds ^ \&
94 .    ds , \&
95 .    ds ~ ~
96 .    ds /
97 .\}
98 .if t \{\
99 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
100 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
101 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
102 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
103 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
104 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
105 .\}
106 .    \" troff and (daisy-wheel) nroff accents
107 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
108 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
109 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
110 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
111 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
112 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
113 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
114 .ds ae a\h'-(\w'a'u*4/10)'e
115 .ds Ae A\h'-(\w'A'u*4/10)'E
116 .    \" corrections for vroff
117 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
118 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
119 .    \" for low resolution devices (crt and lpr)
120 .if \n(.H>23 .if \n(.V>19 \
121 \{\
122 .    ds : e
123 .    ds 8 ss
124 .    ds o a
125 .    ds d- d\h'-1'\(ga
126 .    ds D- D\h'-1'\(hy
127 .    ds th \o'bp'
128 .    ds Th \o'LP'
129 .    ds ae ae
130 .    ds Ae AE
131 .\}
132 .rm #[ #] #H #V #F C
133 .\" ========================================================================
134 .\"
135 .IX Title "SSL 7"
136 .TH SSL 7 "2020-03-31" "1.1.1f" "OpenSSL"
137 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
138 .\" way too many mistakes in technical documents.
139 .if n .ad l
140 .nh
141 .SH "NAME"
142 ssl \- OpenSSL SSL/TLS library
143 .SH "SYNOPSIS"
144 .IX Header "SYNOPSIS"
145 See the individual manual pages for details.
146 .SH "DESCRIPTION"
147 .IX Header "DESCRIPTION"
148 The OpenSSL \fBssl\fR library implements the Secure Sockets Layer (\s-1SSL\s0 v2/v3) and
149 Transport Layer Security (\s-1TLS\s0 v1) protocols. It provides a rich \s-1API\s0 which is
150 documented here.
151 .PP
152 An \fB\s-1SSL_CTX\s0\fR object is created as a framework to establish
153 \&\s-1TLS/SSL\s0 enabled connections (see \fBSSL_CTX_new\fR\|(3)).
154 Various options regarding certificates, algorithms etc. can be set
155 in this object.
156 .PP
157 When a network connection has been created, it can be assigned to an
158 \&\fB\s-1SSL\s0\fR object. After the \fB\s-1SSL\s0\fR object has been created using
159 \&\fBSSL_new\fR\|(3), \fBSSL_set_fd\fR\|(3) or
160 \&\fBSSL_set_bio\fR\|(3) can be used to associate the network
161 connection with the object.
162 .PP
163 When the \s-1TLS/SSL\s0 handshake is performed using
164 \&\fBSSL_accept\fR\|(3) or \fBSSL_connect\fR\|(3)
165 respectively.
166 \&\fBSSL_read_ex\fR\|(3), \fBSSL_read\fR\|(3), \fBSSL_write_ex\fR\|(3) and \fBSSL_write\fR\|(3) are
167 used to read and write data on the \s-1TLS/SSL\s0 connection.
168 \&\fBSSL_shutdown\fR\|(3) can be used to shut down the
169 \&\s-1TLS/SSL\s0 connection.
170 .SH "DATA STRUCTURES"
171 .IX Header "DATA STRUCTURES"
172 Currently the OpenSSL \fBssl\fR library functions deals with the following data
173 structures:
174 .IP "\fB\s-1SSL_METHOD\s0\fR (\s-1SSL\s0 Method)" 4
175 .IX Item "SSL_METHOD (SSL Method)"
176 This is a dispatch structure describing the internal \fBssl\fR library
177 methods/functions which implement the various protocol versions (SSLv3
178 TLSv1, ...). It's needed to create an \fB\s-1SSL_CTX\s0\fR.
179 .IP "\fB\s-1SSL_CIPHER\s0\fR (\s-1SSL\s0 Cipher)" 4
180 .IX Item "SSL_CIPHER (SSL Cipher)"
181 This structure holds the algorithm information for a particular cipher which
182 are a core part of the \s-1SSL/TLS\s0 protocol. The available ciphers are configured
183 on a \fB\s-1SSL_CTX\s0\fR basis and the actual ones used are then part of the
184 \&\fB\s-1SSL_SESSION\s0\fR.
185 .IP "\fB\s-1SSL_CTX\s0\fR (\s-1SSL\s0 Context)" 4
186 .IX Item "SSL_CTX (SSL Context)"
187 This is the global context structure which is created by a server or client
188 once per program life-time and which holds mainly default values for the
189 \&\fB\s-1SSL\s0\fR structures which are later created for the connections.
190 .IP "\fB\s-1SSL_SESSION\s0\fR (\s-1SSL\s0 Session)" 4
191 .IX Item "SSL_SESSION (SSL Session)"
192 This is a structure containing the current \s-1TLS/SSL\s0 session details for a
193 connection: \fB\s-1SSL_CIPHER\s0\fRs, client and server certificates, keys, etc.
194 .IP "\fB\s-1SSL\s0\fR (\s-1SSL\s0 Connection)" 4
195 .IX Item "SSL (SSL Connection)"
196 This is the main \s-1SSL/TLS\s0 structure which is created by a server or client per
197 established connection. This actually is the core structure in the \s-1SSL API.\s0
198 At run-time the application usually deals with this structure which has
199 links to mostly all other structures.
200 .SH "HEADER FILES"
201 .IX Header "HEADER FILES"
202 Currently the OpenSSL \fBssl\fR library provides the following C header files
203 containing the prototypes for the data structures and functions:
204 .IP "\fBssl.h\fR" 4
205 .IX Item "ssl.h"
206 This is the common header file for the \s-1SSL/TLS API.\s0  Include it into your
207 program to make the \s-1API\s0 of the \fBssl\fR library available. It internally
208 includes both more private \s-1SSL\s0 headers and headers from the \fBcrypto\fR library.
209 Whenever you need hard-core details on the internals of the \s-1SSL API,\s0 look
210 inside this header file.
211 .IP "\fBssl2.h\fR" 4
212 .IX Item "ssl2.h"
213 Unused. Present for backwards compatibility only.
214 .IP "\fBssl3.h\fR" 4
215 .IX Item "ssl3.h"
216 This is the sub header file dealing with the SSLv3 protocol only.
217 \&\fIUsually you don't have to include it explicitly because
218 it's already included by ssl.h\fR.
219 .IP "\fBtls1.h\fR" 4
220 .IX Item "tls1.h"
221 This is the sub header file dealing with the TLSv1 protocol only.
222 \&\fIUsually you don't have to include it explicitly because
223 it's already included by ssl.h\fR.
224 .SH "API FUNCTIONS"
225 .IX Header "API FUNCTIONS"
226 Currently the OpenSSL \fBssl\fR library exports 214 \s-1API\s0 functions.
227 They are documented in the following:
228 .SS "Dealing with Protocol Methods"
229 .IX Subsection "Dealing with Protocol Methods"
230 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
231 protocol methods defined in \fB\s-1SSL_METHOD\s0\fR structures.
232 .IP "const \s-1SSL_METHOD\s0 *\fBTLS_method\fR(void);" 4
233 .IX Item "const SSL_METHOD *TLS_method(void);"
234 Constructor for the \fIversion-flexible\fR \s-1SSL_METHOD\s0 structure for clients,
235 servers or both.
236 See \fBSSL_CTX_new\fR\|(3) for details.
237 .IP "const \s-1SSL_METHOD\s0 *\fBTLS_client_method\fR(void);" 4
238 .IX Item "const SSL_METHOD *TLS_client_method(void);"
239 Constructor for the \fIversion-flexible\fR \s-1SSL_METHOD\s0 structure for clients.
240 Must be used to support the TLSv1.3 protocol.
241 .IP "const \s-1SSL_METHOD\s0 *\fBTLS_server_method\fR(void);" 4
242 .IX Item "const SSL_METHOD *TLS_server_method(void);"
243 Constructor for the \fIversion-flexible\fR \s-1SSL_METHOD\s0 structure for servers.
244 Must be used to support the TLSv1.3 protocol.
245 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_2_method\fR(void);" 4
246 .IX Item "const SSL_METHOD *TLSv1_2_method(void);"
247 Constructor for the TLSv1.2 \s-1SSL_METHOD\s0 structure for clients, servers or both.
248 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_2_client_method\fR(void);" 4
249 .IX Item "const SSL_METHOD *TLSv1_2_client_method(void);"
250 Constructor for the TLSv1.2 \s-1SSL_METHOD\s0 structure for clients.
251 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_2_server_method\fR(void);" 4
252 .IX Item "const SSL_METHOD *TLSv1_2_server_method(void);"
253 Constructor for the TLSv1.2 \s-1SSL_METHOD\s0 structure for servers.
254 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_1_method\fR(void);" 4
255 .IX Item "const SSL_METHOD *TLSv1_1_method(void);"
256 Constructor for the TLSv1.1 \s-1SSL_METHOD\s0 structure for clients, servers or both.
257 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_1_client_method\fR(void);" 4
258 .IX Item "const SSL_METHOD *TLSv1_1_client_method(void);"
259 Constructor for the TLSv1.1 \s-1SSL_METHOD\s0 structure for clients.
260 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_1_server_method\fR(void);" 4
261 .IX Item "const SSL_METHOD *TLSv1_1_server_method(void);"
262 Constructor for the TLSv1.1 \s-1SSL_METHOD\s0 structure for servers.
263 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_method\fR(void);" 4
264 .IX Item "const SSL_METHOD *TLSv1_method(void);"
265 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for clients, servers or both.
266 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_client_method\fR(void);" 4
267 .IX Item "const SSL_METHOD *TLSv1_client_method(void);"
268 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for clients.
269 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_server_method\fR(void);" 4
270 .IX Item "const SSL_METHOD *TLSv1_server_method(void);"
271 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for servers.
272 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_method\fR(void);" 4
273 .IX Item "const SSL_METHOD *SSLv3_method(void);"
274 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for clients, servers or both.
275 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_client_method\fR(void);" 4
276 .IX Item "const SSL_METHOD *SSLv3_client_method(void);"
277 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for clients.
278 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_server_method\fR(void);" 4
279 .IX Item "const SSL_METHOD *SSLv3_server_method(void);"
280 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for servers.
281 .SS "Dealing with Ciphers"
282 .IX Subsection "Dealing with Ciphers"
283 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
284 ciphers defined in \fB\s-1SSL_CIPHER\s0\fR structures.
285 .IP "char *\fBSSL_CIPHER_description\fR(\s-1SSL_CIPHER\s0 *cipher, char *buf, int len);" 4
286 .IX Item "char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len);"
287 Write a string to \fIbuf\fR (with a maximum size of \fIlen\fR) containing a human
288 readable description of \fIcipher\fR. Returns \fIbuf\fR.
289 .IP "int \fBSSL_CIPHER_get_bits\fR(\s-1SSL_CIPHER\s0 *cipher, int *alg_bits);" 4
290 .IX Item "int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits);"
291 Determine the number of bits in \fIcipher\fR. Because of export crippled ciphers
292 there are two bits: The bits the algorithm supports in general (stored to
293 \&\fIalg_bits\fR) and the bits which are actually used (the return value).
294 .IP "const char *\fBSSL_CIPHER_get_name\fR(\s-1SSL_CIPHER\s0 *cipher);" 4
295 .IX Item "const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher);"
296 Return the internal name of \fIcipher\fR as a string. These are the various
297 strings defined by the \fISSL3_TXT_xxx\fR and \fITLS1_TXT_xxx\fR
298 definitions in the header files.
299 .IP "const char *\fBSSL_CIPHER_get_version\fR(\s-1SSL_CIPHER\s0 *cipher);" 4
300 .IX Item "const char *SSL_CIPHER_get_version(SSL_CIPHER *cipher);"
301 Returns a string like "\f(CW\*(C`SSLv3\*(C'\fR\*(L" or \*(R"\f(CW\*(C`TLSv1.2\*(C'\fR" which indicates the
302 \&\s-1SSL/TLS\s0 protocol version to which \fIcipher\fR belongs (i.e. where it was defined
303 in the specification the first time).
304 .SS "Dealing with Protocol Contexts"
305 .IX Subsection "Dealing with Protocol Contexts"
306 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
307 protocol context defined in the \fB\s-1SSL_CTX\s0\fR structure.
308 .IP "int \fBSSL_CTX_add_client_CA\fR(\s-1SSL_CTX\s0 *ctx, X509 *x);" 4
309 .IX Item "int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);"
310 .PD 0
311 .IP "long \fBSSL_CTX_add_extra_chain_cert\fR(\s-1SSL_CTX\s0 *ctx, X509 *x509);" 4
312 .IX Item "long SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *x509);"
313 .IP "int \fBSSL_CTX_add_session\fR(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *c);" 4
314 .IX Item "int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c);"
315 .IP "int \fBSSL_CTX_check_private_key\fR(const \s-1SSL_CTX\s0 *ctx);" 4
316 .IX Item "int SSL_CTX_check_private_key(const SSL_CTX *ctx);"
317 .IP "long \fBSSL_CTX_ctrl\fR(\s-1SSL_CTX\s0 *ctx, int cmd, long larg, char *parg);" 4
318 .IX Item "long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg);"
319 .IP "void \fBSSL_CTX_flush_sessions\fR(\s-1SSL_CTX\s0 *s, long t);" 4
320 .IX Item "void SSL_CTX_flush_sessions(SSL_CTX *s, long t);"
321 .IP "void \fBSSL_CTX_free\fR(\s-1SSL_CTX\s0 *a);" 4
322 .IX Item "void SSL_CTX_free(SSL_CTX *a);"
323 .IP "char *\fBSSL_CTX_get_app_data\fR(\s-1SSL_CTX\s0 *ctx);" 4
324 .IX Item "char *SSL_CTX_get_app_data(SSL_CTX *ctx);"
325 .IP "X509_STORE *\fBSSL_CTX_get_cert_store\fR(\s-1SSL_CTX\s0 *ctx);" 4
326 .IX Item "X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx);"
327 .IP "\s-1STACK\s0 *\fBSSL_CTX_get_ciphers\fR(const \s-1SSL_CTX\s0 *ctx);" 4
328 .IX Item "STACK *SSL_CTX_get_ciphers(const SSL_CTX *ctx);"
329 .IP "\s-1STACK\s0 *\fBSSL_CTX_get_client_CA_list\fR(const \s-1SSL_CTX\s0 *ctx);" 4
330 .IX Item "STACK *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx);"
331 .IP "int (*\fBSSL_CTX_get_client_cert_cb\fR(\s-1SSL_CTX\s0 *ctx))(\s-1SSL\s0 *ssl, X509 **x509, \s-1EVP_PKEY\s0 **pkey);" 4
332 .IX Item "int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);"
333 .IP "void \fBSSL_CTX_get_default_read_ahead\fR(\s-1SSL_CTX\s0 *ctx);" 4
334 .IX Item "void SSL_CTX_get_default_read_ahead(SSL_CTX *ctx);"
335 .IP "char *\fBSSL_CTX_get_ex_data\fR(const \s-1SSL_CTX\s0 *s, int idx);" 4
336 .IX Item "char *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx);"
337 .IP "int \fBSSL_CTX_get_ex_new_index\fR(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))" 4
338 .IX Item "int SSL_CTX_get_ex_new_index(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))"
339 .IP "void (*\fBSSL_CTX_get_info_callback\fR(\s-1SSL_CTX\s0 *ctx))(\s-1SSL\s0 *ssl, int cb, int ret);" 4
340 .IX Item "void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(SSL *ssl, int cb, int ret);"
341 .IP "int \fBSSL_CTX_get_quiet_shutdown\fR(const \s-1SSL_CTX\s0 *ctx);" 4
342 .IX Item "int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);"
343 .IP "void \fBSSL_CTX_get_read_ahead\fR(\s-1SSL_CTX\s0 *ctx);" 4
344 .IX Item "void SSL_CTX_get_read_ahead(SSL_CTX *ctx);"
345 .IP "int \fBSSL_CTX_get_session_cache_mode\fR(\s-1SSL_CTX\s0 *ctx);" 4
346 .IX Item "int SSL_CTX_get_session_cache_mode(SSL_CTX *ctx);"
347 .IP "long \fBSSL_CTX_get_timeout\fR(const \s-1SSL_CTX\s0 *ctx);" 4
348 .IX Item "long SSL_CTX_get_timeout(const SSL_CTX *ctx);"
349 .IP "int (*\fBSSL_CTX_get_verify_callback\fR(const \s-1SSL_CTX\s0 *ctx))(int ok, X509_STORE_CTX *ctx);" 4
350 .IX Item "int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx);"
351 .IP "int \fBSSL_CTX_get_verify_mode\fR(\s-1SSL_CTX\s0 *ctx);" 4
352 .IX Item "int SSL_CTX_get_verify_mode(SSL_CTX *ctx);"
353 .IP "int \fBSSL_CTX_load_verify_locations\fR(\s-1SSL_CTX\s0 *ctx, const char *CAfile, const char *CApath);" 4
354 .IX Item "int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath);"
355 .IP "\s-1SSL_CTX\s0 *\fBSSL_CTX_new\fR(const \s-1SSL_METHOD\s0 *meth);" 4
356 .IX Item "SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);"
357 .IP "int SSL_CTX_up_ref(\s-1SSL_CTX\s0 *ctx);" 4
358 .IX Item "int SSL_CTX_up_ref(SSL_CTX *ctx);"
359 .IP "int \fBSSL_CTX_remove_session\fR(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *c);" 4
360 .IX Item "int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c);"
361 .IP "int \fBSSL_CTX_sess_accept\fR(\s-1SSL_CTX\s0 *ctx);" 4
362 .IX Item "int SSL_CTX_sess_accept(SSL_CTX *ctx);"
363 .IP "int \fBSSL_CTX_sess_accept_good\fR(\s-1SSL_CTX\s0 *ctx);" 4
364 .IX Item "int SSL_CTX_sess_accept_good(SSL_CTX *ctx);"
365 .IP "int \fBSSL_CTX_sess_accept_renegotiate\fR(\s-1SSL_CTX\s0 *ctx);" 4
366 .IX Item "int SSL_CTX_sess_accept_renegotiate(SSL_CTX *ctx);"
367 .IP "int \fBSSL_CTX_sess_cache_full\fR(\s-1SSL_CTX\s0 *ctx);" 4
368 .IX Item "int SSL_CTX_sess_cache_full(SSL_CTX *ctx);"
369 .IP "int \fBSSL_CTX_sess_cb_hits\fR(\s-1SSL_CTX\s0 *ctx);" 4
370 .IX Item "int SSL_CTX_sess_cb_hits(SSL_CTX *ctx);"
371 .IP "int \fBSSL_CTX_sess_connect\fR(\s-1SSL_CTX\s0 *ctx);" 4
372 .IX Item "int SSL_CTX_sess_connect(SSL_CTX *ctx);"
373 .IP "int \fBSSL_CTX_sess_connect_good\fR(\s-1SSL_CTX\s0 *ctx);" 4
374 .IX Item "int SSL_CTX_sess_connect_good(SSL_CTX *ctx);"
375 .IP "int \fBSSL_CTX_sess_connect_renegotiate\fR(\s-1SSL_CTX\s0 *ctx);" 4
376 .IX Item "int SSL_CTX_sess_connect_renegotiate(SSL_CTX *ctx);"
377 .IP "int \fBSSL_CTX_sess_get_cache_size\fR(\s-1SSL_CTX\s0 *ctx);" 4
378 .IX Item "int SSL_CTX_sess_get_cache_size(SSL_CTX *ctx);"
379 .IP "\s-1SSL_SESSION\s0 *(*\fBSSL_CTX_sess_get_get_cb\fR(\s-1SSL_CTX\s0 *ctx))(\s-1SSL\s0 *ssl, unsigned char *data, int len, int *copy);" 4
380 .IX Item "SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy);"
381 .IP "int (*\fBSSL_CTX_sess_get_new_cb\fR(\s-1SSL_CTX\s0 *ctx)(\s-1SSL\s0 *ssl, \s-1SSL_SESSION\s0 *sess);" 4
382 .IX Item "int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess);"
383 .IP "void (*\fBSSL_CTX_sess_get_remove_cb\fR(\s-1SSL_CTX\s0 *ctx)(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *sess);" 4
384 .IX Item "void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess);"
385 .IP "int \fBSSL_CTX_sess_hits\fR(\s-1SSL_CTX\s0 *ctx);" 4
386 .IX Item "int SSL_CTX_sess_hits(SSL_CTX *ctx);"
387 .IP "int \fBSSL_CTX_sess_misses\fR(\s-1SSL_CTX\s0 *ctx);" 4
388 .IX Item "int SSL_CTX_sess_misses(SSL_CTX *ctx);"
389 .IP "int \fBSSL_CTX_sess_number\fR(\s-1SSL_CTX\s0 *ctx);" 4
390 .IX Item "int SSL_CTX_sess_number(SSL_CTX *ctx);"
391 .IP "void \fBSSL_CTX_sess_set_cache_size\fR(\s-1SSL_CTX\s0 *ctx, t);" 4
392 .IX Item "void SSL_CTX_sess_set_cache_size(SSL_CTX *ctx, t);"
393 .IP "void \fBSSL_CTX_sess_set_get_cb\fR(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *(*cb)(\s-1SSL\s0 *ssl, unsigned char *data, int len, int *copy));" 4
394 .IX Item "void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy));"
395 .IP "void \fBSSL_CTX_sess_set_new_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb)(\s-1SSL\s0 *ssl, \s-1SSL_SESSION\s0 *sess));" 4
396 .IX Item "void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess));"
397 .IP "void \fBSSL_CTX_sess_set_remove_cb\fR(\s-1SSL_CTX\s0 *ctx, void (*cb)(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *sess));" 4
398 .IX Item "void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess));"
399 .IP "int \fBSSL_CTX_sess_timeouts\fR(\s-1SSL_CTX\s0 *ctx);" 4
400 .IX Item "int SSL_CTX_sess_timeouts(SSL_CTX *ctx);"
401 .IP "\s-1LHASH\s0 *\fBSSL_CTX_sessions\fR(\s-1SSL_CTX\s0 *ctx);" 4
402 .IX Item "LHASH *SSL_CTX_sessions(SSL_CTX *ctx);"
403 .IP "int \fBSSL_CTX_set_app_data\fR(\s-1SSL_CTX\s0 *ctx, void *arg);" 4
404 .IX Item "int SSL_CTX_set_app_data(SSL_CTX *ctx, void *arg);"
405 .IP "void \fBSSL_CTX_set_cert_store\fR(\s-1SSL_CTX\s0 *ctx, X509_STORE *cs);" 4
406 .IX Item "void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *cs);"
407 .IP "void \fBSSL_CTX_set1_cert_store\fR(\s-1SSL_CTX\s0 *ctx, X509_STORE *cs);" 4
408 .IX Item "void SSL_CTX_set1_cert_store(SSL_CTX *ctx, X509_STORE *cs);"
409 .IP "void \fBSSL_CTX_set_cert_verify_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb)(), char *arg)" 4
410 .IX Item "void SSL_CTX_set_cert_verify_cb(SSL_CTX *ctx, int (*cb)(), char *arg)"
411 .IP "int \fBSSL_CTX_set_cipher_list\fR(\s-1SSL_CTX\s0 *ctx, char *str);" 4
412 .IX Item "int SSL_CTX_set_cipher_list(SSL_CTX *ctx, char *str);"
413 .IP "void \fBSSL_CTX_set_client_CA_list\fR(\s-1SSL_CTX\s0 *ctx, \s-1STACK\s0 *list);" 4
414 .IX Item "void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK *list);"
415 .IP "void \fBSSL_CTX_set_client_cert_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb)(\s-1SSL\s0 *ssl, X509 **x509, \s-1EVP_PKEY\s0 **pkey));" 4
416 .IX Item "void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));"
417 .IP "int \fBSSL_CTX_set_ct_validation_callback\fR(\s-1SSL_CTX\s0 *ctx, ssl_ct_validation_cb callback, void *arg);" 4
418 .IX Item "int SSL_CTX_set_ct_validation_callback(SSL_CTX *ctx, ssl_ct_validation_cb callback, void *arg);"
419 .IP "void \fBSSL_CTX_set_default_passwd_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb);(void))" 4
420 .IX Item "void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, int (*cb);(void))"
421 .IP "void \fBSSL_CTX_set_default_read_ahead\fR(\s-1SSL_CTX\s0 *ctx, int m);" 4
422 .IX Item "void SSL_CTX_set_default_read_ahead(SSL_CTX *ctx, int m);"
423 .IP "int \fBSSL_CTX_set_default_verify_paths\fR(\s-1SSL_CTX\s0 *ctx);" 4
424 .IX Item "int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);"
425 .PD
426 Use the default paths to locate trusted \s-1CA\s0 certificates. There is one default
427 directory path and one default file path. Both are set via this call.
428 .IP "int \fBSSL_CTX_set_default_verify_dir\fR(\s-1SSL_CTX\s0 *ctx)" 4
429 .IX Item "int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx)"
430 Use the default directory path to locate trusted \s-1CA\s0 certificates.
431 .IP "int \fBSSL_CTX_set_default_verify_file\fR(\s-1SSL_CTX\s0 *ctx)" 4
432 .IX Item "int SSL_CTX_set_default_verify_file(SSL_CTX *ctx)"
433 Use the file path to locate trusted \s-1CA\s0 certificates.
434 .IP "int \fBSSL_CTX_set_ex_data\fR(\s-1SSL_CTX\s0 *s, int idx, char *arg);" 4
435 .IX Item "int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, char *arg);"
436 .PD 0
437 .IP "void \fBSSL_CTX_set_info_callback\fR(\s-1SSL_CTX\s0 *ctx, void (*cb)(\s-1SSL\s0 *ssl, int cb, int ret));" 4
438 .IX Item "void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret));"
439 .IP "void \fBSSL_CTX_set_msg_callback\fR(\s-1SSL_CTX\s0 *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, \s-1SSL\s0 *ssl, void *arg));" 4
440 .IX Item "void SSL_CTX_set_msg_callback(SSL_CTX *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));"
441 .IP "void \fBSSL_CTX_set_msg_callback_arg\fR(\s-1SSL_CTX\s0 *ctx, void *arg);" 4
442 .IX Item "void SSL_CTX_set_msg_callback_arg(SSL_CTX *ctx, void *arg);"
443 .IP "unsigned long \fBSSL_CTX_clear_options\fR(\s-1SSL_CTX\s0 *ctx, unsigned long op);" 4
444 .IX Item "unsigned long SSL_CTX_clear_options(SSL_CTX *ctx, unsigned long op);"
445 .IP "unsigned long \fBSSL_CTX_get_options\fR(\s-1SSL_CTX\s0 *ctx);" 4
446 .IX Item "unsigned long SSL_CTX_get_options(SSL_CTX *ctx);"
447 .IP "unsigned long \fBSSL_CTX_set_options\fR(\s-1SSL_CTX\s0 *ctx, unsigned long op);" 4
448 .IX Item "unsigned long SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);"
449 .IP "void \fBSSL_CTX_set_quiet_shutdown\fR(\s-1SSL_CTX\s0 *ctx, int mode);" 4
450 .IX Item "void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);"
451 .IP "void \fBSSL_CTX_set_read_ahead\fR(\s-1SSL_CTX\s0 *ctx, int m);" 4
452 .IX Item "void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int m);"
453 .IP "void \fBSSL_CTX_set_session_cache_mode\fR(\s-1SSL_CTX\s0 *ctx, int mode);" 4
454 .IX Item "void SSL_CTX_set_session_cache_mode(SSL_CTX *ctx, int mode);"
455 .IP "int \fBSSL_CTX_set_ssl_version\fR(\s-1SSL_CTX\s0 *ctx, const \s-1SSL_METHOD\s0 *meth);" 4
456 .IX Item "int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);"
457 .IP "void \fBSSL_CTX_set_timeout\fR(\s-1SSL_CTX\s0 *ctx, long t);" 4
458 .IX Item "void SSL_CTX_set_timeout(SSL_CTX *ctx, long t);"
459 .IP "long \fBSSL_CTX_set_tmp_dh\fR(SSL_CTX* ctx, \s-1DH\s0 *dh);" 4
460 .IX Item "long SSL_CTX_set_tmp_dh(SSL_CTX* ctx, DH *dh);"
461 .IP "long \fBSSL_CTX_set_tmp_dh_callback\fR(\s-1SSL_CTX\s0 *ctx, \s-1DH\s0 *(*cb)(void));" 4
462 .IX Item "long SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*cb)(void));"
463 .IP "void \fBSSL_CTX_set_verify\fR(\s-1SSL_CTX\s0 *ctx, int mode, int (*cb);(void))" 4
464 .IX Item "void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb);(void))"
465 .IP "int \fBSSL_CTX_use_PrivateKey\fR(\s-1SSL_CTX\s0 *ctx, \s-1EVP_PKEY\s0 *pkey);" 4
466 .IX Item "int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);"
467 .IP "int \fBSSL_CTX_use_PrivateKey_ASN1\fR(int type, \s-1SSL_CTX\s0 *ctx, unsigned char *d, long len);" 4
468 .IX Item "int SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, unsigned char *d, long len);"
469 .IP "int \fBSSL_CTX_use_PrivateKey_file\fR(\s-1SSL_CTX\s0 *ctx, const char *file, int type);" 4
470 .IX Item "int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);"
471 .IP "int \fBSSL_CTX_use_RSAPrivateKey\fR(\s-1SSL_CTX\s0 *ctx, \s-1RSA\s0 *rsa);" 4
472 .IX Item "int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);"
473 .IP "int \fBSSL_CTX_use_RSAPrivateKey_ASN1\fR(\s-1SSL_CTX\s0 *ctx, unsigned char *d, long len);" 4
474 .IX Item "int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len);"
475 .IP "int \fBSSL_CTX_use_RSAPrivateKey_file\fR(\s-1SSL_CTX\s0 *ctx, const char *file, int type);" 4
476 .IX Item "int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);"
477 .IP "int \fBSSL_CTX_use_certificate\fR(\s-1SSL_CTX\s0 *ctx, X509 *x);" 4
478 .IX Item "int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);"
479 .IP "int \fBSSL_CTX_use_certificate_ASN1\fR(\s-1SSL_CTX\s0 *ctx, int len, unsigned char *d);" 4
480 .IX Item "int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d);"
481 .IP "int \fBSSL_CTX_use_certificate_file\fR(\s-1SSL_CTX\s0 *ctx, const char *file, int type);" 4
482 .IX Item "int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);"
483 .IP "int \fBSSL_CTX_use_cert_and_key\fR(\s-1SSL_CTX\s0 *ctx, X509 *x, \s-1EVP_PKEY\s0 *pkey, \s-1STACK_OF\s0(X509) *chain, int override);" 4
484 .IX Item "int SSL_CTX_use_cert_and_key(SSL_CTX *ctx, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override);"
485 .IP "X509 *\fBSSL_CTX_get0_certificate\fR(const \s-1SSL_CTX\s0 *ctx);" 4
486 .IX Item "X509 *SSL_CTX_get0_certificate(const SSL_CTX *ctx);"
487 .IP "\s-1EVP_PKEY\s0 *\fBSSL_CTX_get0_privatekey\fR(const \s-1SSL_CTX\s0 *ctx);" 4
488 .IX Item "EVP_PKEY *SSL_CTX_get0_privatekey(const SSL_CTX *ctx);"
489 .IP "void \fBSSL_CTX_set_psk_client_callback\fR(\s-1SSL_CTX\s0 *ctx, unsigned int (*callback)(\s-1SSL\s0 *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));" 4
490 .IX Item "void SSL_CTX_set_psk_client_callback(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));"
491 .IP "int \fBSSL_CTX_use_psk_identity_hint\fR(\s-1SSL_CTX\s0 *ctx, const char *hint);" 4
492 .IX Item "int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *hint);"
493 .IP "void \fBSSL_CTX_set_psk_server_callback\fR(\s-1SSL_CTX\s0 *ctx, unsigned int (*callback)(\s-1SSL\s0 *ssl, const char *identity, unsigned char *psk, int max_psk_len));" 4
494 .IX Item "void SSL_CTX_set_psk_server_callback(SSL_CTX *ctx, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len));"
495 .PD
496 .SS "Dealing with Sessions"
497 .IX Subsection "Dealing with Sessions"
498 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
499 sessions defined in the \fB\s-1SSL_SESSION\s0\fR structures.
500 .IP "int \fBSSL_SESSION_cmp\fR(const \s-1SSL_SESSION\s0 *a, const \s-1SSL_SESSION\s0 *b);" 4
501 .IX Item "int SSL_SESSION_cmp(const SSL_SESSION *a, const SSL_SESSION *b);"
502 .PD 0
503 .IP "void \fBSSL_SESSION_free\fR(\s-1SSL_SESSION\s0 *ss);" 4
504 .IX Item "void SSL_SESSION_free(SSL_SESSION *ss);"
505 .IP "char *\fBSSL_SESSION_get_app_data\fR(\s-1SSL_SESSION\s0 *s);" 4
506 .IX Item "char *SSL_SESSION_get_app_data(SSL_SESSION *s);"
507 .IP "char *\fBSSL_SESSION_get_ex_data\fR(const \s-1SSL_SESSION\s0 *s, int idx);" 4
508 .IX Item "char *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx);"
509 .IP "int \fBSSL_SESSION_get_ex_new_index\fR(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))" 4
510 .IX Item "int SSL_SESSION_get_ex_new_index(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))"
511 .IP "long \fBSSL_SESSION_get_time\fR(const \s-1SSL_SESSION\s0 *s);" 4
512 .IX Item "long SSL_SESSION_get_time(const SSL_SESSION *s);"
513 .IP "long \fBSSL_SESSION_get_timeout\fR(const \s-1SSL_SESSION\s0 *s);" 4
514 .IX Item "long SSL_SESSION_get_timeout(const SSL_SESSION *s);"
515 .IP "unsigned long \fBSSL_SESSION_hash\fR(const \s-1SSL_SESSION\s0 *a);" 4
516 .IX Item "unsigned long SSL_SESSION_hash(const SSL_SESSION *a);"
517 .IP "\s-1SSL_SESSION\s0 *\fBSSL_SESSION_new\fR(void);" 4
518 .IX Item "SSL_SESSION *SSL_SESSION_new(void);"
519 .IP "int \fBSSL_SESSION_print\fR(\s-1BIO\s0 *bp, const \s-1SSL_SESSION\s0 *x);" 4
520 .IX Item "int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x);"
521 .IP "int \fBSSL_SESSION_print_fp\fR(\s-1FILE\s0 *fp, const \s-1SSL_SESSION\s0 *x);" 4
522 .IX Item "int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x);"
523 .IP "int \fBSSL_SESSION_set_app_data\fR(\s-1SSL_SESSION\s0 *s, char *a);" 4
524 .IX Item "int SSL_SESSION_set_app_data(SSL_SESSION *s, char *a);"
525 .IP "int \fBSSL_SESSION_set_ex_data\fR(\s-1SSL_SESSION\s0 *s, int idx, char *arg);" 4
526 .IX Item "int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, char *arg);"
527 .IP "long \fBSSL_SESSION_set_time\fR(\s-1SSL_SESSION\s0 *s, long t);" 4
528 .IX Item "long SSL_SESSION_set_time(SSL_SESSION *s, long t);"
529 .IP "long \fBSSL_SESSION_set_timeout\fR(\s-1SSL_SESSION\s0 *s, long t);" 4
530 .IX Item "long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);"
531 .PD
532 .SS "Dealing with Connections"
533 .IX Subsection "Dealing with Connections"
534 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
535 connection defined in the \fB\s-1SSL\s0\fR structure.
536 .IP "int \fBSSL_accept\fR(\s-1SSL\s0 *ssl);" 4
537 .IX Item "int SSL_accept(SSL *ssl);"
538 .PD 0
539 .IP "int \fBSSL_add_dir_cert_subjects_to_stack\fR(\s-1STACK\s0 *stack, const char *dir);" 4
540 .IX Item "int SSL_add_dir_cert_subjects_to_stack(STACK *stack, const char *dir);"
541 .IP "int \fBSSL_add_file_cert_subjects_to_stack\fR(\s-1STACK\s0 *stack, const char *file);" 4
542 .IX Item "int SSL_add_file_cert_subjects_to_stack(STACK *stack, const char *file);"
543 .IP "int \fBSSL_add_client_CA\fR(\s-1SSL\s0 *ssl, X509 *x);" 4
544 .IX Item "int SSL_add_client_CA(SSL *ssl, X509 *x);"
545 .IP "char *\fBSSL_alert_desc_string\fR(int value);" 4
546 .IX Item "char *SSL_alert_desc_string(int value);"
547 .IP "char *\fBSSL_alert_desc_string_long\fR(int value);" 4
548 .IX Item "char *SSL_alert_desc_string_long(int value);"
549 .IP "char *\fBSSL_alert_type_string\fR(int value);" 4
550 .IX Item "char *SSL_alert_type_string(int value);"
551 .IP "char *\fBSSL_alert_type_string_long\fR(int value);" 4
552 .IX Item "char *SSL_alert_type_string_long(int value);"
553 .IP "int \fBSSL_check_private_key\fR(const \s-1SSL\s0 *ssl);" 4
554 .IX Item "int SSL_check_private_key(const SSL *ssl);"
555 .IP "void \fBSSL_clear\fR(\s-1SSL\s0 *ssl);" 4
556 .IX Item "void SSL_clear(SSL *ssl);"
557 .IP "long \fBSSL_clear_num_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
558 .IX Item "long SSL_clear_num_renegotiations(SSL *ssl);"
559 .IP "int \fBSSL_connect\fR(\s-1SSL\s0 *ssl);" 4
560 .IX Item "int SSL_connect(SSL *ssl);"
561 .IP "int \fBSSL_copy_session_id\fR(\s-1SSL\s0 *t, const \s-1SSL\s0 *f);" 4
562 .IX Item "int SSL_copy_session_id(SSL *t, const SSL *f);"
563 .PD
564 Sets the session details for \fBt\fR to be the same as in \fBf\fR. Returns 1 on
565 success or 0 on failure.
566 .IP "long \fBSSL_ctrl\fR(\s-1SSL\s0 *ssl, int cmd, long larg, char *parg);" 4
567 .IX Item "long SSL_ctrl(SSL *ssl, int cmd, long larg, char *parg);"
568 .PD 0
569 .IP "int \fBSSL_do_handshake\fR(\s-1SSL\s0 *ssl);" 4
570 .IX Item "int SSL_do_handshake(SSL *ssl);"
571 .IP "\s-1SSL\s0 *\fBSSL_dup\fR(\s-1SSL\s0 *ssl);" 4
572 .IX Item "SSL *SSL_dup(SSL *ssl);"
573 .PD
574 \&\fBSSL_dup()\fR allows applications to configure an \s-1SSL\s0 handle for use
575 in multiple \s-1SSL\s0 connections, and then duplicate it prior to initiating
576 each connection with the duplicated handle.
577 Use of \fBSSL_dup()\fR avoids the need to repeat the configuration of the
578 handles for each connection.
579 .Sp
580 For \fBSSL_dup()\fR to work, the connection \s-1MUST\s0 be in its initial state
581 and \s-1MUST NOT\s0 have not yet have started the \s-1SSL\s0 handshake.
582 For connections that are not in their initial state \fBSSL_dup()\fR just
583 increments an internal reference count and returns the \fIsame\fR
584 handle.
585 It may be possible to use \fBSSL_clear\fR\|(3) to recycle an \s-1SSL\s0 handle
586 that is not in its initial state for re-use, but this is best
587 avoided.
588 Instead, save and restore the session, if desired, and construct a
589 fresh handle for each connection.
590 .IP "\s-1STACK\s0 *\fBSSL_dup_CA_list\fR(\s-1STACK\s0 *sk);" 4
591 .IX Item "STACK *SSL_dup_CA_list(STACK *sk);"
592 .PD 0
593 .IP "void \fBSSL_free\fR(\s-1SSL\s0 *ssl);" 4
594 .IX Item "void SSL_free(SSL *ssl);"
595 .IP "\s-1SSL_CTX\s0 *\fBSSL_get_SSL_CTX\fR(const \s-1SSL\s0 *ssl);" 4
596 .IX Item "SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);"
597 .IP "char *\fBSSL_get_app_data\fR(\s-1SSL\s0 *ssl);" 4
598 .IX Item "char *SSL_get_app_data(SSL *ssl);"
599 .IP "X509 *\fBSSL_get_certificate\fR(const \s-1SSL\s0 *ssl);" 4
600 .IX Item "X509 *SSL_get_certificate(const SSL *ssl);"
601 .IP "const char *\fBSSL_get_cipher\fR(const \s-1SSL\s0 *ssl);" 4
602 .IX Item "const char *SSL_get_cipher(const SSL *ssl);"
603 .IP "int \fBSSL_is_dtls\fR(const \s-1SSL\s0 *ssl);" 4
604 .IX Item "int SSL_is_dtls(const SSL *ssl);"
605 .IP "int \fBSSL_get_cipher_bits\fR(const \s-1SSL\s0 *ssl, int *alg_bits);" 4
606 .IX Item "int SSL_get_cipher_bits(const SSL *ssl, int *alg_bits);"
607 .IP "char *\fBSSL_get_cipher_list\fR(const \s-1SSL\s0 *ssl, int n);" 4
608 .IX Item "char *SSL_get_cipher_list(const SSL *ssl, int n);"
609 .IP "char *\fBSSL_get_cipher_name\fR(const \s-1SSL\s0 *ssl);" 4
610 .IX Item "char *SSL_get_cipher_name(const SSL *ssl);"
611 .IP "char *\fBSSL_get_cipher_version\fR(const \s-1SSL\s0 *ssl);" 4
612 .IX Item "char *SSL_get_cipher_version(const SSL *ssl);"
613 .IP "\s-1STACK\s0 *\fBSSL_get_ciphers\fR(const \s-1SSL\s0 *ssl);" 4
614 .IX Item "STACK *SSL_get_ciphers(const SSL *ssl);"
615 .IP "\s-1STACK\s0 *\fBSSL_get_client_CA_list\fR(const \s-1SSL\s0 *ssl);" 4
616 .IX Item "STACK *SSL_get_client_CA_list(const SSL *ssl);"
617 .IP "\s-1SSL_CIPHER\s0 *\fBSSL_get_current_cipher\fR(\s-1SSL\s0 *ssl);" 4
618 .IX Item "SSL_CIPHER *SSL_get_current_cipher(SSL *ssl);"
619 .IP "long \fBSSL_get_default_timeout\fR(const \s-1SSL\s0 *ssl);" 4
620 .IX Item "long SSL_get_default_timeout(const SSL *ssl);"
621 .IP "int \fBSSL_get_error\fR(const \s-1SSL\s0 *ssl, int i);" 4
622 .IX Item "int SSL_get_error(const SSL *ssl, int i);"
623 .IP "char *\fBSSL_get_ex_data\fR(const \s-1SSL\s0 *ssl, int idx);" 4
624 .IX Item "char *SSL_get_ex_data(const SSL *ssl, int idx);"
625 .IP "int \fBSSL_get_ex_data_X509_STORE_CTX_idx\fR(void);" 4
626 .IX Item "int SSL_get_ex_data_X509_STORE_CTX_idx(void);"
627 .IP "int \fBSSL_get_ex_new_index\fR(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))" 4
628 .IX Item "int SSL_get_ex_new_index(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))"
629 .IP "int \fBSSL_get_fd\fR(const \s-1SSL\s0 *ssl);" 4
630 .IX Item "int SSL_get_fd(const SSL *ssl);"
631 .IP "void (*\fBSSL_get_info_callback\fR(const \s-1SSL\s0 *ssl);)()" 4
632 .IX Item "void (*SSL_get_info_callback(const SSL *ssl);)()"
633 .IP "int \fBSSL_get_key_update_type\fR(\s-1SSL\s0 *s);" 4
634 .IX Item "int SSL_get_key_update_type(SSL *s);"
635 .IP "\s-1STACK\s0 *\fBSSL_get_peer_cert_chain\fR(const \s-1SSL\s0 *ssl);" 4
636 .IX Item "STACK *SSL_get_peer_cert_chain(const SSL *ssl);"
637 .IP "X509 *\fBSSL_get_peer_certificate\fR(const \s-1SSL\s0 *ssl);" 4
638 .IX Item "X509 *SSL_get_peer_certificate(const SSL *ssl);"
639 .IP "const \s-1STACK_OF\s0(\s-1SCT\s0) *\fBSSL_get0_peer_scts\fR(\s-1SSL\s0 *s);" 4
640 .IX Item "const STACK_OF(SCT) *SSL_get0_peer_scts(SSL *s);"
641 .IP "\s-1EVP_PKEY\s0 *\fBSSL_get_privatekey\fR(const \s-1SSL\s0 *ssl);" 4
642 .IX Item "EVP_PKEY *SSL_get_privatekey(const SSL *ssl);"
643 .IP "int \fBSSL_get_quiet_shutdown\fR(const \s-1SSL\s0 *ssl);" 4
644 .IX Item "int SSL_get_quiet_shutdown(const SSL *ssl);"
645 .IP "\s-1BIO\s0 *\fBSSL_get_rbio\fR(const \s-1SSL\s0 *ssl);" 4
646 .IX Item "BIO *SSL_get_rbio(const SSL *ssl);"
647 .IP "int \fBSSL_get_read_ahead\fR(const \s-1SSL\s0 *ssl);" 4
648 .IX Item "int SSL_get_read_ahead(const SSL *ssl);"
649 .IP "\s-1SSL_SESSION\s0 *\fBSSL_get_session\fR(const \s-1SSL\s0 *ssl);" 4
650 .IX Item "SSL_SESSION *SSL_get_session(const SSL *ssl);"
651 .IP "char *\fBSSL_get_shared_ciphers\fR(const \s-1SSL\s0 *ssl, char *buf, int size);" 4
652 .IX Item "char *SSL_get_shared_ciphers(const SSL *ssl, char *buf, int size);"
653 .IP "int \fBSSL_get_shutdown\fR(const \s-1SSL\s0 *ssl);" 4
654 .IX Item "int SSL_get_shutdown(const SSL *ssl);"
655 .IP "const \s-1SSL_METHOD\s0 *\fBSSL_get_ssl_method\fR(\s-1SSL\s0 *ssl);" 4
656 .IX Item "const SSL_METHOD *SSL_get_ssl_method(SSL *ssl);"
657 .IP "int \fBSSL_get_state\fR(const \s-1SSL\s0 *ssl);" 4
658 .IX Item "int SSL_get_state(const SSL *ssl);"
659 .IP "long \fBSSL_get_time\fR(const \s-1SSL\s0 *ssl);" 4
660 .IX Item "long SSL_get_time(const SSL *ssl);"
661 .IP "long \fBSSL_get_timeout\fR(const \s-1SSL\s0 *ssl);" 4
662 .IX Item "long SSL_get_timeout(const SSL *ssl);"
663 .IP "int (*\fBSSL_get_verify_callback\fR(const \s-1SSL\s0 *ssl))(int, X509_STORE_CTX *)" 4
664 .IX Item "int (*SSL_get_verify_callback(const SSL *ssl))(int, X509_STORE_CTX *)"
665 .IP "int \fBSSL_get_verify_mode\fR(const \s-1SSL\s0 *ssl);" 4
666 .IX Item "int SSL_get_verify_mode(const SSL *ssl);"
667 .IP "long \fBSSL_get_verify_result\fR(const \s-1SSL\s0 *ssl);" 4
668 .IX Item "long SSL_get_verify_result(const SSL *ssl);"
669 .IP "char *\fBSSL_get_version\fR(const \s-1SSL\s0 *ssl);" 4
670 .IX Item "char *SSL_get_version(const SSL *ssl);"
671 .IP "\s-1BIO\s0 *\fBSSL_get_wbio\fR(const \s-1SSL\s0 *ssl);" 4
672 .IX Item "BIO *SSL_get_wbio(const SSL *ssl);"
673 .IP "int \fBSSL_in_accept_init\fR(\s-1SSL\s0 *ssl);" 4
674 .IX Item "int SSL_in_accept_init(SSL *ssl);"
675 .IP "int \fBSSL_in_before\fR(\s-1SSL\s0 *ssl);" 4
676 .IX Item "int SSL_in_before(SSL *ssl);"
677 .IP "int \fBSSL_in_connect_init\fR(\s-1SSL\s0 *ssl);" 4
678 .IX Item "int SSL_in_connect_init(SSL *ssl);"
679 .IP "int \fBSSL_in_init\fR(\s-1SSL\s0 *ssl);" 4
680 .IX Item "int SSL_in_init(SSL *ssl);"
681 .IP "int \fBSSL_is_init_finished\fR(\s-1SSL\s0 *ssl);" 4
682 .IX Item "int SSL_is_init_finished(SSL *ssl);"
683 .IP "int \fBSSL_key_update\fR(\s-1SSL\s0 *s, int updatetype);" 4
684 .IX Item "int SSL_key_update(SSL *s, int updatetype);"
685 .IP "\s-1STACK\s0 *\fBSSL_load_client_CA_file\fR(const char *file);" 4
686 .IX Item "STACK *SSL_load_client_CA_file(const char *file);"
687 .IP "\s-1SSL\s0 *\fBSSL_new\fR(\s-1SSL_CTX\s0 *ctx);" 4
688 .IX Item "SSL *SSL_new(SSL_CTX *ctx);"
689 .IP "int SSL_up_ref(\s-1SSL\s0 *s);" 4
690 .IX Item "int SSL_up_ref(SSL *s);"
691 .IP "long \fBSSL_num_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
692 .IX Item "long SSL_num_renegotiations(SSL *ssl);"
693 .IP "int \fBSSL_peek\fR(\s-1SSL\s0 *ssl, void *buf, int num);" 4
694 .IX Item "int SSL_peek(SSL *ssl, void *buf, int num);"
695 .IP "int \fBSSL_pending\fR(const \s-1SSL\s0 *ssl);" 4
696 .IX Item "int SSL_pending(const SSL *ssl);"
697 .IP "int \fBSSL_read\fR(\s-1SSL\s0 *ssl, void *buf, int num);" 4
698 .IX Item "int SSL_read(SSL *ssl, void *buf, int num);"
699 .IP "int \fBSSL_renegotiate\fR(\s-1SSL\s0 *ssl);" 4
700 .IX Item "int SSL_renegotiate(SSL *ssl);"
701 .IP "char *\fBSSL_rstate_string\fR(\s-1SSL\s0 *ssl);" 4
702 .IX Item "char *SSL_rstate_string(SSL *ssl);"
703 .IP "char *\fBSSL_rstate_string_long\fR(\s-1SSL\s0 *ssl);" 4
704 .IX Item "char *SSL_rstate_string_long(SSL *ssl);"
705 .IP "long \fBSSL_session_reused\fR(\s-1SSL\s0 *ssl);" 4
706 .IX Item "long SSL_session_reused(SSL *ssl);"
707 .IP "void \fBSSL_set_accept_state\fR(\s-1SSL\s0 *ssl);" 4
708 .IX Item "void SSL_set_accept_state(SSL *ssl);"
709 .IP "void \fBSSL_set_app_data\fR(\s-1SSL\s0 *ssl, char *arg);" 4
710 .IX Item "void SSL_set_app_data(SSL *ssl, char *arg);"
711 .IP "void \fBSSL_set_bio\fR(\s-1SSL\s0 *ssl, \s-1BIO\s0 *rbio, \s-1BIO\s0 *wbio);" 4
712 .IX Item "void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio);"
713 .IP "int \fBSSL_set_cipher_list\fR(\s-1SSL\s0 *ssl, char *str);" 4
714 .IX Item "int SSL_set_cipher_list(SSL *ssl, char *str);"
715 .IP "void \fBSSL_set_client_CA_list\fR(\s-1SSL\s0 *ssl, \s-1STACK\s0 *list);" 4
716 .IX Item "void SSL_set_client_CA_list(SSL *ssl, STACK *list);"
717 .IP "void \fBSSL_set_connect_state\fR(\s-1SSL\s0 *ssl);" 4
718 .IX Item "void SSL_set_connect_state(SSL *ssl);"
719 .IP "int \fBSSL_set_ct_validation_callback\fR(\s-1SSL\s0 *ssl, ssl_ct_validation_cb callback, void *arg);" 4
720 .IX Item "int SSL_set_ct_validation_callback(SSL *ssl, ssl_ct_validation_cb callback, void *arg);"
721 .IP "int \fBSSL_set_ex_data\fR(\s-1SSL\s0 *ssl, int idx, char *arg);" 4
722 .IX Item "int SSL_set_ex_data(SSL *ssl, int idx, char *arg);"
723 .IP "int \fBSSL_set_fd\fR(\s-1SSL\s0 *ssl, int fd);" 4
724 .IX Item "int SSL_set_fd(SSL *ssl, int fd);"
725 .IP "void \fBSSL_set_info_callback\fR(\s-1SSL\s0 *ssl, void (*cb);(void))" 4
726 .IX Item "void SSL_set_info_callback(SSL *ssl, void (*cb);(void))"
727 .IP "void \fBSSL_set_msg_callback\fR(\s-1SSL\s0 *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, \s-1SSL\s0 *ssl, void *arg));" 4
728 .IX Item "void SSL_set_msg_callback(SSL *ctx, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));"
729 .IP "void \fBSSL_set_msg_callback_arg\fR(\s-1SSL\s0 *ctx, void *arg);" 4
730 .IX Item "void SSL_set_msg_callback_arg(SSL *ctx, void *arg);"
731 .IP "unsigned long \fBSSL_clear_options\fR(\s-1SSL\s0 *ssl, unsigned long op);" 4
732 .IX Item "unsigned long SSL_clear_options(SSL *ssl, unsigned long op);"
733 .IP "unsigned long \fBSSL_get_options\fR(\s-1SSL\s0 *ssl);" 4
734 .IX Item "unsigned long SSL_get_options(SSL *ssl);"
735 .IP "unsigned long \fBSSL_set_options\fR(\s-1SSL\s0 *ssl, unsigned long op);" 4
736 .IX Item "unsigned long SSL_set_options(SSL *ssl, unsigned long op);"
737 .IP "void \fBSSL_set_quiet_shutdown\fR(\s-1SSL\s0 *ssl, int mode);" 4
738 .IX Item "void SSL_set_quiet_shutdown(SSL *ssl, int mode);"
739 .IP "void \fBSSL_set_read_ahead\fR(\s-1SSL\s0 *ssl, int yes);" 4
740 .IX Item "void SSL_set_read_ahead(SSL *ssl, int yes);"
741 .IP "int \fBSSL_set_rfd\fR(\s-1SSL\s0 *ssl, int fd);" 4
742 .IX Item "int SSL_set_rfd(SSL *ssl, int fd);"
743 .IP "int \fBSSL_set_session\fR(\s-1SSL\s0 *ssl, \s-1SSL_SESSION\s0 *session);" 4
744 .IX Item "int SSL_set_session(SSL *ssl, SSL_SESSION *session);"
745 .IP "void \fBSSL_set_shutdown\fR(\s-1SSL\s0 *ssl, int mode);" 4
746 .IX Item "void SSL_set_shutdown(SSL *ssl, int mode);"
747 .IP "int \fBSSL_set_ssl_method\fR(\s-1SSL\s0 *ssl, const \s-1SSL_METHOD\s0 *meth);" 4
748 .IX Item "int SSL_set_ssl_method(SSL *ssl, const SSL_METHOD *meth);"
749 .IP "void \fBSSL_set_time\fR(\s-1SSL\s0 *ssl, long t);" 4
750 .IX Item "void SSL_set_time(SSL *ssl, long t);"
751 .IP "void \fBSSL_set_timeout\fR(\s-1SSL\s0 *ssl, long t);" 4
752 .IX Item "void SSL_set_timeout(SSL *ssl, long t);"
753 .IP "void \fBSSL_set_verify\fR(\s-1SSL\s0 *ssl, int mode, int (*callback);(void))" 4
754 .IX Item "void SSL_set_verify(SSL *ssl, int mode, int (*callback);(void))"
755 .IP "void \fBSSL_set_verify_result\fR(\s-1SSL\s0 *ssl, long arg);" 4
756 .IX Item "void SSL_set_verify_result(SSL *ssl, long arg);"
757 .IP "int \fBSSL_set_wfd\fR(\s-1SSL\s0 *ssl, int fd);" 4
758 .IX Item "int SSL_set_wfd(SSL *ssl, int fd);"
759 .IP "int \fBSSL_shutdown\fR(\s-1SSL\s0 *ssl);" 4
760 .IX Item "int SSL_shutdown(SSL *ssl);"
761 .IP "\s-1OSSL_HANDSHAKE_STATE\s0 \fBSSL_get_state\fR(const \s-1SSL\s0 *ssl);" 4
762 .IX Item "OSSL_HANDSHAKE_STATE SSL_get_state(const SSL *ssl);"
763 .PD
764 Returns the current handshake state.
765 .IP "char *\fBSSL_state_string\fR(const \s-1SSL\s0 *ssl);" 4
766 .IX Item "char *SSL_state_string(const SSL *ssl);"
767 .PD 0
768 .IP "char *\fBSSL_state_string_long\fR(const \s-1SSL\s0 *ssl);" 4
769 .IX Item "char *SSL_state_string_long(const SSL *ssl);"
770 .IP "long \fBSSL_total_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
771 .IX Item "long SSL_total_renegotiations(SSL *ssl);"
772 .IP "int \fBSSL_use_PrivateKey\fR(\s-1SSL\s0 *ssl, \s-1EVP_PKEY\s0 *pkey);" 4
773 .IX Item "int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);"
774 .IP "int \fBSSL_use_PrivateKey_ASN1\fR(int type, \s-1SSL\s0 *ssl, unsigned char *d, long len);" 4
775 .IX Item "int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, unsigned char *d, long len);"
776 .IP "int \fBSSL_use_PrivateKey_file\fR(\s-1SSL\s0 *ssl, const char *file, int type);" 4
777 .IX Item "int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);"
778 .IP "int \fBSSL_use_RSAPrivateKey\fR(\s-1SSL\s0 *ssl, \s-1RSA\s0 *rsa);" 4
779 .IX Item "int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);"
780 .IP "int \fBSSL_use_RSAPrivateKey_ASN1\fR(\s-1SSL\s0 *ssl, unsigned char *d, long len);" 4
781 .IX Item "int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);"
782 .IP "int \fBSSL_use_RSAPrivateKey_file\fR(\s-1SSL\s0 *ssl, const char *file, int type);" 4
783 .IX Item "int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);"
784 .IP "int \fBSSL_use_certificate\fR(\s-1SSL\s0 *ssl, X509 *x);" 4
785 .IX Item "int SSL_use_certificate(SSL *ssl, X509 *x);"
786 .IP "int \fBSSL_use_certificate_ASN1\fR(\s-1SSL\s0 *ssl, int len, unsigned char *d);" 4
787 .IX Item "int SSL_use_certificate_ASN1(SSL *ssl, int len, unsigned char *d);"
788 .IP "int \fBSSL_use_certificate_file\fR(\s-1SSL\s0 *ssl, const char *file, int type);" 4
789 .IX Item "int SSL_use_certificate_file(SSL *ssl, const char *file, int type);"
790 .IP "int \fBSSL_use_cert_and_key\fR(\s-1SSL\s0 *ssl, X509 *x, \s-1EVP_PKEY\s0 *pkey, \s-1STACK_OF\s0(X509) *chain, int override);" 4
791 .IX Item "int SSL_use_cert_and_key(SSL *ssl, X509 *x, EVP_PKEY *pkey, STACK_OF(X509) *chain, int override);"
792 .IP "int \fBSSL_version\fR(const \s-1SSL\s0 *ssl);" 4
793 .IX Item "int SSL_version(const SSL *ssl);"
794 .IP "int \fBSSL_want\fR(const \s-1SSL\s0 *ssl);" 4
795 .IX Item "int SSL_want(const SSL *ssl);"
796 .IP "int \fBSSL_want_nothing\fR(const \s-1SSL\s0 *ssl);" 4
797 .IX Item "int SSL_want_nothing(const SSL *ssl);"
798 .IP "int \fBSSL_want_read\fR(const \s-1SSL\s0 *ssl);" 4
799 .IX Item "int SSL_want_read(const SSL *ssl);"
800 .IP "int \fBSSL_want_write\fR(const \s-1SSL\s0 *ssl);" 4
801 .IX Item "int SSL_want_write(const SSL *ssl);"
802 .IP "int \fBSSL_want_x509_lookup\fR(const \s-1SSL\s0 *ssl);" 4
803 .IX Item "int SSL_want_x509_lookup(const SSL *ssl);"
804 .IP "int \fBSSL_write\fR(\s-1SSL\s0 *ssl, const void *buf, int num);" 4
805 .IX Item "int SSL_write(SSL *ssl, const void *buf, int num);"
806 .IP "void \fBSSL_set_psk_client_callback\fR(\s-1SSL\s0 *ssl, unsigned int (*callback)(\s-1SSL\s0 *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));" 4
807 .IX Item "void SSL_set_psk_client_callback(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len));"
808 .IP "int \fBSSL_use_psk_identity_hint\fR(\s-1SSL\s0 *ssl, const char *hint);" 4
809 .IX Item "int SSL_use_psk_identity_hint(SSL *ssl, const char *hint);"
810 .IP "void \fBSSL_set_psk_server_callback\fR(\s-1SSL\s0 *ssl, unsigned int (*callback)(\s-1SSL\s0 *ssl, const char *identity, unsigned char *psk, int max_psk_len));" 4
811 .IX Item "void SSL_set_psk_server_callback(SSL *ssl, unsigned int (*callback)(SSL *ssl, const char *identity, unsigned char *psk, int max_psk_len));"
812 .IP "const char *\fBSSL_get_psk_identity_hint\fR(\s-1SSL\s0 *ssl);" 4
813 .IX Item "const char *SSL_get_psk_identity_hint(SSL *ssl);"
814 .IP "const char *\fBSSL_get_psk_identity\fR(\s-1SSL\s0 *ssl);" 4
815 .IX Item "const char *SSL_get_psk_identity(SSL *ssl);"
816 .PD
817 .SH "RETURN VALUES"
818 .IX Header "RETURN VALUES"
819 See the individual manual pages for details.
820 .SH "SEE ALSO"
821 .IX Header "SEE ALSO"
822 \&\fBopenssl\fR\|(1), \fBcrypto\fR\|(7),
823 \&\fBCRYPTO_get_ex_new_index\fR\|(3),
824 \&\fBSSL_accept\fR\|(3), \fBSSL_clear\fR\|(3),
825 \&\fBSSL_connect\fR\|(3),
826 \&\fBSSL_CIPHER_get_name\fR\|(3),
827 \&\fBSSL_COMP_add_compression_method\fR\|(3),
828 \&\fBSSL_CTX_add_extra_chain_cert\fR\|(3),
829 \&\fBSSL_CTX_add_session\fR\|(3),
830 \&\fBSSL_CTX_ctrl\fR\|(3),
831 \&\fBSSL_CTX_flush_sessions\fR\|(3),
832 \&\fBSSL_CTX_get_verify_mode\fR\|(3),
833 \&\fBSSL_CTX_load_verify_locations\fR\|(3)
834 \&\fBSSL_CTX_new\fR\|(3),
835 \&\fBSSL_CTX_sess_number\fR\|(3),
836 \&\fBSSL_CTX_sess_set_cache_size\fR\|(3),
837 \&\fBSSL_CTX_sess_set_get_cb\fR\|(3),
838 \&\fBSSL_CTX_sessions\fR\|(3),
839 \&\fBSSL_CTX_set_cert_store\fR\|(3),
840 \&\fBSSL_CTX_set_cert_verify_callback\fR\|(3),
841 \&\fBSSL_CTX_set_cipher_list\fR\|(3),
842 \&\fBSSL_CTX_set_client_CA_list\fR\|(3),
843 \&\fBSSL_CTX_set_client_cert_cb\fR\|(3),
844 \&\fBSSL_CTX_set_default_passwd_cb\fR\|(3),
845 \&\fBSSL_CTX_set_generate_session_id\fR\|(3),
846 \&\fBSSL_CTX_set_info_callback\fR\|(3),
847 \&\fBSSL_CTX_set_max_cert_list\fR\|(3),
848 \&\fBSSL_CTX_set_mode\fR\|(3),
849 \&\fBSSL_CTX_set_msg_callback\fR\|(3),
850 \&\fBSSL_CTX_set_options\fR\|(3),
851 \&\fBSSL_CTX_set_quiet_shutdown\fR\|(3),
852 \&\fBSSL_CTX_set_read_ahead\fR\|(3),
853 \&\fBSSL_CTX_set_security_level\fR\|(3),
854 \&\fBSSL_CTX_set_session_cache_mode\fR\|(3),
855 \&\fBSSL_CTX_set_session_id_context\fR\|(3),
856 \&\fBSSL_CTX_set_ssl_version\fR\|(3),
857 \&\fBSSL_CTX_set_timeout\fR\|(3),
858 \&\fBSSL_CTX_set_tmp_dh_callback\fR\|(3),
859 \&\fBSSL_CTX_set_verify\fR\|(3),
860 \&\fBSSL_CTX_use_certificate\fR\|(3),
861 \&\fBSSL_alert_type_string\fR\|(3),
862 \&\fBSSL_do_handshake\fR\|(3),
863 \&\fBSSL_enable_ct\fR\|(3),
864 \&\fBSSL_get_SSL_CTX\fR\|(3),
865 \&\fBSSL_get_ciphers\fR\|(3),
866 \&\fBSSL_get_client_CA_list\fR\|(3),
867 \&\fBSSL_get_default_timeout\fR\|(3),
868 \&\fBSSL_get_error\fR\|(3),
869 \&\fBSSL_get_ex_data_X509_STORE_CTX_idx\fR\|(3),
870 \&\fBSSL_get_fd\fR\|(3),
871 \&\fBSSL_get_peer_cert_chain\fR\|(3),
872 \&\fBSSL_get_rbio\fR\|(3),
873 \&\fBSSL_get_session\fR\|(3),
874 \&\fBSSL_get_verify_result\fR\|(3),
875 \&\fBSSL_get_version\fR\|(3),
876 \&\fBSSL_load_client_CA_file\fR\|(3),
877 \&\fBSSL_new\fR\|(3),
878 \&\fBSSL_pending\fR\|(3),
879 \&\fBSSL_read_ex\fR\|(3),
880 \&\fBSSL_read\fR\|(3),
881 \&\fBSSL_rstate_string\fR\|(3),
882 \&\fBSSL_session_reused\fR\|(3),
883 \&\fBSSL_set_bio\fR\|(3),
884 \&\fBSSL_set_connect_state\fR\|(3),
885 \&\fBSSL_set_fd\fR\|(3),
886 \&\fBSSL_set_session\fR\|(3),
887 \&\fBSSL_set_shutdown\fR\|(3),
888 \&\fBSSL_shutdown\fR\|(3),
889 \&\fBSSL_state_string\fR\|(3),
890 \&\fBSSL_want\fR\|(3),
891 \&\fBSSL_write_ex\fR\|(3),
892 \&\fBSSL_write\fR\|(3),
893 \&\fBSSL_SESSION_free\fR\|(3),
894 \&\fBSSL_SESSION_get_time\fR\|(3),
895 \&\fBd2i_SSL_SESSION\fR\|(3),
896 \&\fBSSL_CTX_set_psk_client_callback\fR\|(3),
897 \&\fBSSL_CTX_use_psk_identity_hint\fR\|(3),
898 \&\fBSSL_get_psk_identity\fR\|(3),
899 \&\fBDTLSv1_listen\fR\|(3)
900 .SH "HISTORY"
901 .IX Header "HISTORY"
902 \&\fBSSLv2_client_method\fR, \fBSSLv2_server_method\fR and \fBSSLv2_method\fR were removed
903 in OpenSSL 1.1.0.
904 .PP
905 The return type of \fBSSL_copy_session_id\fR was changed from void to int in
906 OpenSSL 1.1.0.
907 .SH "COPYRIGHT"
908 .IX Header "COPYRIGHT"
909 Copyright 2000\-2018 The OpenSSL Project Authors. All Rights Reserved.
910 .PP
911 Licensed under the OpenSSL license (the \*(L"License\*(R").  You may not use
912 this file except in compliance with the License.  You can obtain a copy
913 in the file \s-1LICENSE\s0 in the source distribution or at
914 <https://www.openssl.org/source/license.html>.