1 .\" $NetBSD: ssl.3,v 1.14 2015/06/12 17:01:15 christos Exp $
3 .\" Automatically generated by Pod::Man 2.28 (Pod::Simple 3.28)
6 .\" ========================================================================
7 .de Sp \" Vertical space (when we can't use .PP)
11 .de Vb \" Begin verbatim text
16 .de Ve \" End verbatim text
20 .\" Set up some character translations and predefined strings. \*(-- will
21 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
22 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
23 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
24 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
25 .\" nothing in troff, for use with C<>.
27 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
31 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
32 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
47 .\" Escape single quotes in literal strings from groff's Unicode transform.
51 .\" If the F register is turned on, we'll generate index entries on stderr for
52 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
53 .\" entries marked with X<> in POD. Of course, you'll have to process the
54 .\" output yourself in some meaningful fashion.
56 .\" Avoid warning from groff about undefined register 'F'.
60 .if \n(.g .if rF .nr rF 1
61 .if (\n(rF:(\n(.g==0)) \{
64 . tm Index:\\$1\t\\n%\t"\\$2"
74 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
75 .\" Fear. Run. Save yourself. No user-serviceable parts.
76 . \" fudge factors for nroff and troff
85 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
91 . \" simple accents for nroff and troff
101 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
102 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
103 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
104 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
105 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
106 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
108 . \" troff and (daisy-wheel) nroff accents
109 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
110 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
111 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
112 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
113 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
114 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
115 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
116 .ds ae a\h'-(\w'a'u*4/10)'e
117 .ds Ae A\h'-(\w'A'u*4/10)'E
118 . \" corrections for vroff
119 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
120 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
121 . \" for low resolution devices (crt and lpr)
122 .if \n(.H>23 .if \n(.V>19 \
135 .\" ========================================================================
138 .TH ssl 3 "2015-03-23" "1.0.1n" "OpenSSL"
139 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
140 .\" way too many mistakes in technical documents.
144 SSL \- OpenSSL SSL/TLS library
148 .IX Header "SYNOPSIS"
150 .IX Header "DESCRIPTION"
151 The OpenSSL \fBssl\fR library implements the Secure Sockets Layer (\s-1SSL\s0 v2/v3) and
152 Transport Layer Security (\s-1TLS\s0 v1) protocols. It provides a rich \s-1API\s0 which is
155 At first the library must be initialized; see
156 \&\fISSL_library_init\fR\|(3).
158 Then an \fB\s-1SSL_CTX\s0\fR object is created as a framework to establish
159 \&\s-1TLS/SSL\s0 enabled connections (see \fISSL_CTX_new\fR\|(3)).
160 Various options regarding certificates, algorithms etc. can be set
163 When a network connection has been created, it can be assigned to an
164 \&\fB\s-1SSL\s0\fR object. After the \fB\s-1SSL\s0\fR object has been created using
165 \&\fISSL_new\fR\|(3), \fISSL_set_fd\fR\|(3) or
166 \&\fISSL_set_bio\fR\|(3) can be used to associate the network
167 connection with the object.
169 Then the \s-1TLS/SSL\s0 handshake is performed using
170 \&\fISSL_accept\fR\|(3) or \fISSL_connect\fR\|(3)
172 \&\fISSL_read\fR\|(3) and \fISSL_write\fR\|(3) are used
173 to read and write data on the \s-1TLS/SSL\s0 connection.
174 \&\fISSL_shutdown\fR\|(3) can be used to shut down the
175 \&\s-1TLS/SSL\s0 connection.
176 .SH "DATA STRUCTURES"
177 .IX Header "DATA STRUCTURES"
178 Currently the OpenSSL \fBssl\fR library functions deals with the following data
180 .IP "\fB\s-1SSL_METHOD\s0\fR (\s-1SSL\s0 Method)" 4
181 .IX Item "SSL_METHOD (SSL Method)"
182 That's a dispatch structure describing the internal \fBssl\fR library
183 methods/functions which implement the various protocol versions (SSLv1, SSLv2
184 and TLSv1). It's needed to create an \fB\s-1SSL_CTX\s0\fR.
185 .IP "\fB\s-1SSL_CIPHER\s0\fR (\s-1SSL\s0 Cipher)" 4
186 .IX Item "SSL_CIPHER (SSL Cipher)"
187 This structure holds the algorithm information for a particular cipher which
188 are a core part of the \s-1SSL/TLS\s0 protocol. The available ciphers are configured
189 on a \fB\s-1SSL_CTX\s0\fR basis and the actually used ones are then part of the
190 \&\fB\s-1SSL_SESSION\s0\fR.
191 .IP "\fB\s-1SSL_CTX\s0\fR (\s-1SSL\s0 Context)" 4
192 .IX Item "SSL_CTX (SSL Context)"
193 That's the global context structure which is created by a server or client
194 once per program life-time and which holds mainly default values for the
195 \&\fB\s-1SSL\s0\fR structures which are later created for the connections.
196 .IP "\fB\s-1SSL_SESSION\s0\fR (\s-1SSL\s0 Session)" 4
197 .IX Item "SSL_SESSION (SSL Session)"
198 This is a structure containing the current \s-1TLS/SSL\s0 session details for a
199 connection: \fB\s-1SSL_CIPHER\s0\fRs, client and server certificates, keys, etc.
200 .IP "\fB\s-1SSL\s0\fR (\s-1SSL\s0 Connection)" 4
201 .IX Item "SSL (SSL Connection)"
202 That's the main \s-1SSL/TLS\s0 structure which is created by a server or client per
203 established connection. This actually is the core structure in the \s-1SSL API.\s0
204 Under run-time the application usually deals with this structure which has
205 links to mostly all other structures.
207 .IX Header "HEADER FILES"
208 Currently the OpenSSL \fBssl\fR library provides the following C header files
209 containing the prototypes for the data structures and and functions:
212 That's the common header file for the \s-1SSL/TLS API. \s0 Include it into your
213 program to make the \s-1API\s0 of the \fBssl\fR library available. It internally
214 includes both more private \s-1SSL\s0 headers and headers from the \fBcrypto\fR library.
215 Whenever you need hard-core details on the internals of the \s-1SSL API,\s0 look
216 inside this header file.
219 That's the sub header file dealing with the SSLv2 protocol only.
220 \&\fIUsually you don't have to include it explicitly because
221 it's already included by ssl.h\fR.
224 That's the sub header file dealing with the SSLv3 protocol only.
225 \&\fIUsually you don't have to include it explicitly because
226 it's already included by ssl.h\fR.
227 .IP "\fBssl23.h\fR" 4
229 That's the sub header file dealing with the combined use of the SSLv2 and
231 \&\fIUsually you don't have to include it explicitly because
232 it's already included by ssl.h\fR.
235 That's the sub header file dealing with the TLSv1 protocol only.
236 \&\fIUsually you don't have to include it explicitly because
237 it's already included by ssl.h\fR.
239 .IX Header "API FUNCTIONS"
240 Currently the OpenSSL \fBssl\fR library exports 214 \s-1API\s0 functions.
241 They are documented in the following:
242 .SS "\s-1DEALING WITH PROTOCOL METHODS\s0"
243 .IX Subsection "DEALING WITH PROTOCOL METHODS"
244 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
245 protocol methods defined in \fB\s-1SSL_METHOD\s0\fR structures.
246 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv2_client_method\fR(void);" 4
247 .IX Item "const SSL_METHOD *SSLv2_client_method(void);"
248 Constructor for the SSLv2 \s-1SSL_METHOD\s0 structure for a dedicated client.
249 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv2_server_method\fR(void);" 4
250 .IX Item "const SSL_METHOD *SSLv2_server_method(void);"
251 Constructor for the SSLv2 \s-1SSL_METHOD\s0 structure for a dedicated server.
252 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv2_method\fR(void);" 4
253 .IX Item "const SSL_METHOD *SSLv2_method(void);"
254 Constructor for the SSLv2 \s-1SSL_METHOD\s0 structure for combined client and server.
255 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_client_method\fR(void);" 4
256 .IX Item "const SSL_METHOD *SSLv3_client_method(void);"
257 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for a dedicated client.
258 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_server_method\fR(void);" 4
259 .IX Item "const SSL_METHOD *SSLv3_server_method(void);"
260 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for a dedicated server.
261 .IP "const \s-1SSL_METHOD\s0 *\fBSSLv3_method\fR(void);" 4
262 .IX Item "const SSL_METHOD *SSLv3_method(void);"
263 Constructor for the SSLv3 \s-1SSL_METHOD\s0 structure for combined client and server.
264 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_client_method\fR(void);" 4
265 .IX Item "const SSL_METHOD *TLSv1_client_method(void);"
266 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for a dedicated client.
267 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_server_method\fR(void);" 4
268 .IX Item "const SSL_METHOD *TLSv1_server_method(void);"
269 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for a dedicated server.
270 .IP "const \s-1SSL_METHOD\s0 *\fBTLSv1_method\fR(void);" 4
271 .IX Item "const SSL_METHOD *TLSv1_method(void);"
272 Constructor for the TLSv1 \s-1SSL_METHOD\s0 structure for combined client and server.
273 .SS "\s-1DEALING WITH CIPHERS\s0"
274 .IX Subsection "DEALING WITH CIPHERS"
275 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
276 ciphers defined in \fB\s-1SSL_CIPHER\s0\fR structures.
277 .IP "char *\fBSSL_CIPHER_description\fR(\s-1SSL_CIPHER\s0 *cipher, char *buf, int len);" 4
278 .IX Item "char *SSL_CIPHER_description(SSL_CIPHER *cipher, char *buf, int len);"
279 Write a string to \fIbuf\fR (with a maximum size of \fIlen\fR) containing a human
280 readable description of \fIcipher\fR. Returns \fIbuf\fR.
281 .IP "int \fBSSL_CIPHER_get_bits\fR(\s-1SSL_CIPHER\s0 *cipher, int *alg_bits);" 4
282 .IX Item "int SSL_CIPHER_get_bits(SSL_CIPHER *cipher, int *alg_bits);"
283 Determine the number of bits in \fIcipher\fR. Because of export crippled ciphers
284 there are two bits: The bits the algorithm supports in general (stored to
285 \&\fIalg_bits\fR) and the bits which are actually used (the return value).
286 .IP "const char *\fBSSL_CIPHER_get_name\fR(\s-1SSL_CIPHER\s0 *cipher);" 4
287 .IX Item "const char *SSL_CIPHER_get_name(SSL_CIPHER *cipher);"
288 Return the internal name of \fIcipher\fR as a string. These are the various
289 strings defined by the \fISSL2_TXT_xxx\fR, \fISSL3_TXT_xxx\fR and \fITLS1_TXT_xxx\fR
290 definitions in the header files.
291 .IP "char *\fBSSL_CIPHER_get_version\fR(\s-1SSL_CIPHER\s0 *cipher);" 4
292 .IX Item "char *SSL_CIPHER_get_version(SSL_CIPHER *cipher);"
293 Returns a string like "\f(CW\*(C`TLSv1/SSLv3\*(C'\fR\*(L" or \*(R"\f(CW\*(C`SSLv2\*(C'\fR" which indicates the
294 \&\s-1SSL/TLS\s0 protocol version to which \fIcipher\fR belongs (i.e. where it was defined
295 in the specification the first time).
296 .SS "\s-1DEALING WITH PROTOCOL CONTEXTS\s0"
297 .IX Subsection "DEALING WITH PROTOCOL CONTEXTS"
298 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
299 protocol context defined in the \fB\s-1SSL_CTX\s0\fR structure.
300 .IP "int \fBSSL_CTX_add_client_CA\fR(\s-1SSL_CTX\s0 *ctx, X509 *x);" 4
301 .IX Item "int SSL_CTX_add_client_CA(SSL_CTX *ctx, X509 *x);"
303 .IP "long \fBSSL_CTX_add_extra_chain_cert\fR(\s-1SSL_CTX\s0 *ctx, X509 *x509);" 4
304 .IX Item "long SSL_CTX_add_extra_chain_cert(SSL_CTX *ctx, X509 *x509);"
305 .IP "int \fBSSL_CTX_add_session\fR(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *c);" 4
306 .IX Item "int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c);"
307 .IP "int \fBSSL_CTX_check_private_key\fR(const \s-1SSL_CTX\s0 *ctx);" 4
308 .IX Item "int SSL_CTX_check_private_key(const SSL_CTX *ctx);"
309 .IP "long \fBSSL_CTX_ctrl\fR(\s-1SSL_CTX\s0 *ctx, int cmd, long larg, char *parg);" 4
310 .IX Item "long SSL_CTX_ctrl(SSL_CTX *ctx, int cmd, long larg, char *parg);"
311 .IP "void \fBSSL_CTX_flush_sessions\fR(\s-1SSL_CTX\s0 *s, long t);" 4
312 .IX Item "void SSL_CTX_flush_sessions(SSL_CTX *s, long t);"
313 .IP "void \fBSSL_CTX_free\fR(\s-1SSL_CTX\s0 *a);" 4
314 .IX Item "void SSL_CTX_free(SSL_CTX *a);"
315 .IP "char *\fBSSL_CTX_get_app_data\fR(\s-1SSL_CTX\s0 *ctx);" 4
316 .IX Item "char *SSL_CTX_get_app_data(SSL_CTX *ctx);"
317 .IP "X509_STORE *\fBSSL_CTX_get_cert_store\fR(\s-1SSL_CTX\s0 *ctx);" 4
318 .IX Item "X509_STORE *SSL_CTX_get_cert_store(SSL_CTX *ctx);"
319 .IP "\s-1STACK\s0 *\fBSSL_CTX_get_client_CA_list\fR(const \s-1SSL_CTX\s0 *ctx);" 4
320 .IX Item "STACK *SSL_CTX_get_client_CA_list(const SSL_CTX *ctx);"
321 .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
322 .IX Item "int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);"
323 .IP "void \fBSSL_CTX_get_default_read_ahead\fR(\s-1SSL_CTX\s0 *ctx);" 4
324 .IX Item "void SSL_CTX_get_default_read_ahead(SSL_CTX *ctx);"
325 .IP "char *\fBSSL_CTX_get_ex_data\fR(const \s-1SSL_CTX\s0 *s, int idx);" 4
326 .IX Item "char *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx);"
327 .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
328 .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))"
329 .IP "void (*\fBSSL_CTX_get_info_callback\fR(\s-1SSL_CTX\s0 *ctx))(\s-1SSL\s0 *ssl, int cb, int ret);" 4
330 .IX Item "void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(SSL *ssl, int cb, int ret);"
331 .IP "int \fBSSL_CTX_get_quiet_shutdown\fR(const \s-1SSL_CTX\s0 *ctx);" 4
332 .IX Item "int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);"
333 .IP "void \fBSSL_CTX_get_read_ahead\fR(\s-1SSL_CTX\s0 *ctx);" 4
334 .IX Item "void SSL_CTX_get_read_ahead(SSL_CTX *ctx);"
335 .IP "int \fBSSL_CTX_get_session_cache_mode\fR(\s-1SSL_CTX\s0 *ctx);" 4
336 .IX Item "int SSL_CTX_get_session_cache_mode(SSL_CTX *ctx);"
337 .IP "long \fBSSL_CTX_get_timeout\fR(const \s-1SSL_CTX\s0 *ctx);" 4
338 .IX Item "long SSL_CTX_get_timeout(const SSL_CTX *ctx);"
339 .IP "int (*\fBSSL_CTX_get_verify_callback\fR(const \s-1SSL_CTX\s0 *ctx))(int ok, X509_STORE_CTX *ctx);" 4
340 .IX Item "int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int ok, X509_STORE_CTX *ctx);"
341 .IP "int \fBSSL_CTX_get_verify_mode\fR(\s-1SSL_CTX\s0 *ctx);" 4
342 .IX Item "int SSL_CTX_get_verify_mode(SSL_CTX *ctx);"
343 .IP "int \fBSSL_CTX_load_verify_locations\fR(\s-1SSL_CTX\s0 *ctx, char *CAfile, char *CApath);" 4
344 .IX Item "int SSL_CTX_load_verify_locations(SSL_CTX *ctx, char *CAfile, char *CApath);"
345 .IP "long \fBSSL_CTX_need_tmp_RSA\fR(\s-1SSL_CTX\s0 *ctx);" 4
346 .IX Item "long SSL_CTX_need_tmp_RSA(SSL_CTX *ctx);"
347 .IP "\s-1SSL_CTX\s0 *\fBSSL_CTX_new\fR(const \s-1SSL_METHOD\s0 *meth);" 4
348 .IX Item "SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);"
349 .IP "int \fBSSL_CTX_remove_session\fR(\s-1SSL_CTX\s0 *ctx, \s-1SSL_SESSION\s0 *c);" 4
350 .IX Item "int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c);"
351 .IP "int \fBSSL_CTX_sess_accept\fR(\s-1SSL_CTX\s0 *ctx);" 4
352 .IX Item "int SSL_CTX_sess_accept(SSL_CTX *ctx);"
353 .IP "int \fBSSL_CTX_sess_accept_good\fR(\s-1SSL_CTX\s0 *ctx);" 4
354 .IX Item "int SSL_CTX_sess_accept_good(SSL_CTX *ctx);"
355 .IP "int \fBSSL_CTX_sess_accept_renegotiate\fR(\s-1SSL_CTX\s0 *ctx);" 4
356 .IX Item "int SSL_CTX_sess_accept_renegotiate(SSL_CTX *ctx);"
357 .IP "int \fBSSL_CTX_sess_cache_full\fR(\s-1SSL_CTX\s0 *ctx);" 4
358 .IX Item "int SSL_CTX_sess_cache_full(SSL_CTX *ctx);"
359 .IP "int \fBSSL_CTX_sess_cb_hits\fR(\s-1SSL_CTX\s0 *ctx);" 4
360 .IX Item "int SSL_CTX_sess_cb_hits(SSL_CTX *ctx);"
361 .IP "int \fBSSL_CTX_sess_connect\fR(\s-1SSL_CTX\s0 *ctx);" 4
362 .IX Item "int SSL_CTX_sess_connect(SSL_CTX *ctx);"
363 .IP "int \fBSSL_CTX_sess_connect_good\fR(\s-1SSL_CTX\s0 *ctx);" 4
364 .IX Item "int SSL_CTX_sess_connect_good(SSL_CTX *ctx);"
365 .IP "int \fBSSL_CTX_sess_connect_renegotiate\fR(\s-1SSL_CTX\s0 *ctx);" 4
366 .IX Item "int SSL_CTX_sess_connect_renegotiate(SSL_CTX *ctx);"
367 .IP "int \fBSSL_CTX_sess_get_cache_size\fR(\s-1SSL_CTX\s0 *ctx);" 4
368 .IX Item "int SSL_CTX_sess_get_cache_size(SSL_CTX *ctx);"
369 .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
370 .IX Item "SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl, unsigned char *data, int len, int *copy);"
371 .IP "int (*\fBSSL_CTX_sess_get_new_cb\fR(\s-1SSL_CTX\s0 *ctx)(\s-1SSL\s0 *ssl, \s-1SSL_SESSION\s0 *sess);" 4
372 .IX Item "int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)(SSL *ssl, SSL_SESSION *sess);"
373 .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
374 .IX Item "void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)(SSL_CTX *ctx, SSL_SESSION *sess);"
375 .IP "int \fBSSL_CTX_sess_hits\fR(\s-1SSL_CTX\s0 *ctx);" 4
376 .IX Item "int SSL_CTX_sess_hits(SSL_CTX *ctx);"
377 .IP "int \fBSSL_CTX_sess_misses\fR(\s-1SSL_CTX\s0 *ctx);" 4
378 .IX Item "int SSL_CTX_sess_misses(SSL_CTX *ctx);"
379 .IP "int \fBSSL_CTX_sess_number\fR(\s-1SSL_CTX\s0 *ctx);" 4
380 .IX Item "int SSL_CTX_sess_number(SSL_CTX *ctx);"
381 .IP "void \fBSSL_CTX_sess_set_cache_size\fR(\s-1SSL_CTX\s0 *ctx,t);" 4
382 .IX Item "void SSL_CTX_sess_set_cache_size(SSL_CTX *ctx,t);"
383 .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
384 .IX Item "void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*cb)(SSL *ssl, unsigned char *data, int len, int *copy));"
385 .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
386 .IX Item "void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*cb)(SSL *ssl, SSL_SESSION *sess));"
387 .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
388 .IX Item "void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess));"
389 .IP "int \fBSSL_CTX_sess_timeouts\fR(\s-1SSL_CTX\s0 *ctx);" 4
390 .IX Item "int SSL_CTX_sess_timeouts(SSL_CTX *ctx);"
391 .IP "\s-1LHASH\s0 *\fBSSL_CTX_sessions\fR(\s-1SSL_CTX\s0 *ctx);" 4
392 .IX Item "LHASH *SSL_CTX_sessions(SSL_CTX *ctx);"
393 .IP "void \fBSSL_CTX_set_app_data\fR(\s-1SSL_CTX\s0 *ctx, void *arg);" 4
394 .IX Item "void SSL_CTX_set_app_data(SSL_CTX *ctx, void *arg);"
395 .IP "void \fBSSL_CTX_set_cert_store\fR(\s-1SSL_CTX\s0 *ctx, X509_STORE *cs);" 4
396 .IX Item "void SSL_CTX_set_cert_store(SSL_CTX *ctx, X509_STORE *cs);"
397 .IP "void \fBSSL_CTX_set_cert_verify_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb)(), char *arg)" 4
398 .IX Item "void SSL_CTX_set_cert_verify_cb(SSL_CTX *ctx, int (*cb)(), char *arg)"
399 .IP "int \fBSSL_CTX_set_cipher_list\fR(\s-1SSL_CTX\s0 *ctx, char *str);" 4
400 .IX Item "int SSL_CTX_set_cipher_list(SSL_CTX *ctx, char *str);"
401 .IP "void \fBSSL_CTX_set_client_CA_list\fR(\s-1SSL_CTX\s0 *ctx, \s-1STACK\s0 *list);" 4
402 .IX Item "void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK *list);"
403 .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
404 .IX Item "void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));"
405 .IP "void \fBSSL_CTX_set_default_passwd_cb\fR(\s-1SSL_CTX\s0 *ctx, int (*cb);(void))" 4
406 .IX Item "void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, int (*cb);(void))"
407 .IP "void \fBSSL_CTX_set_default_read_ahead\fR(\s-1SSL_CTX\s0 *ctx, int m);" 4
408 .IX Item "void SSL_CTX_set_default_read_ahead(SSL_CTX *ctx, int m);"
409 .IP "int \fBSSL_CTX_set_default_verify_paths\fR(\s-1SSL_CTX\s0 *ctx);" 4
410 .IX Item "int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);"
411 .IP "int \fBSSL_CTX_set_ex_data\fR(\s-1SSL_CTX\s0 *s, int idx, char *arg);" 4
412 .IX Item "int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, char *arg);"
413 .IP "void \fBSSL_CTX_set_info_callback\fR(\s-1SSL_CTX\s0 *ctx, void (*cb)(\s-1SSL\s0 *ssl, int cb, int ret));" 4
414 .IX Item "void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(SSL *ssl, int cb, int ret));"
415 .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
416 .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));"
417 .IP "void \fBSSL_CTX_set_msg_callback_arg\fR(\s-1SSL_CTX\s0 *ctx, void *arg);" 4
418 .IX Item "void SSL_CTX_set_msg_callback_arg(SSL_CTX *ctx, void *arg);"
419 .IP "void \fBSSL_CTX_set_options\fR(\s-1SSL_CTX\s0 *ctx, unsigned long op);" 4
420 .IX Item "void SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);"
421 .IP "void \fBSSL_CTX_set_quiet_shutdown\fR(\s-1SSL_CTX\s0 *ctx, int mode);" 4
422 .IX Item "void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx, int mode);"
423 .IP "void \fBSSL_CTX_set_read_ahead\fR(\s-1SSL_CTX\s0 *ctx, int m);" 4
424 .IX Item "void SSL_CTX_set_read_ahead(SSL_CTX *ctx, int m);"
425 .IP "void \fBSSL_CTX_set_session_cache_mode\fR(\s-1SSL_CTX\s0 *ctx, int mode);" 4
426 .IX Item "void SSL_CTX_set_session_cache_mode(SSL_CTX *ctx, int mode);"
427 .IP "int \fBSSL_CTX_set_ssl_version\fR(\s-1SSL_CTX\s0 *ctx, const \s-1SSL_METHOD\s0 *meth);" 4
428 .IX Item "int SSL_CTX_set_ssl_version(SSL_CTX *ctx, const SSL_METHOD *meth);"
429 .IP "void \fBSSL_CTX_set_timeout\fR(\s-1SSL_CTX\s0 *ctx, long t);" 4
430 .IX Item "void SSL_CTX_set_timeout(SSL_CTX *ctx, long t);"
431 .IP "long \fBSSL_CTX_set_tmp_dh\fR(SSL_CTX* ctx, \s-1DH\s0 *dh);" 4
432 .IX Item "long SSL_CTX_set_tmp_dh(SSL_CTX* ctx, DH *dh);"
433 .IP "long \fBSSL_CTX_set_tmp_dh_callback\fR(\s-1SSL_CTX\s0 *ctx, \s-1DH\s0 *(*cb)(void));" 4
434 .IX Item "long SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx, DH *(*cb)(void));"
435 .IP "long \fBSSL_CTX_set_tmp_rsa\fR(\s-1SSL_CTX\s0 *ctx, \s-1RSA\s0 *rsa);" 4
436 .IX Item "long SSL_CTX_set_tmp_rsa(SSL_CTX *ctx, RSA *rsa);"
437 .IP "SSL_CTX_set_tmp_rsa_callback" 4
438 .IX Item "SSL_CTX_set_tmp_rsa_callback"
440 \&\f(CW\*(C`long \f(CBSSL_CTX_set_tmp_rsa_callback\f(CW(SSL_CTX *\f(CBctx\f(CW, RSA *(*\f(CBcb\f(CW)(SSL *\f(CBssl\f(CW, int \f(CBexport\f(CW, int \f(CBkeylength\f(CW));\*(C'\fR
442 Sets the callback which will be called when a temporary private key is
443 required. The \fB\f(CB\*(C`export\*(C'\fB\fR flag will be set if the reason for needing
444 a temp key is that an export ciphersuite is in use, in which case,
445 \&\fB\f(CB\*(C`keylength\*(C'\fB\fR will contain the required keylength in bits. Generate a key of
446 appropriate size (using ???) and return it.
447 .IP "SSL_set_tmp_rsa_callback" 4
448 .IX Item "SSL_set_tmp_rsa_callback"
449 long \fBSSL_set_tmp_rsa_callback\fR(\s-1SSL\s0 *ssl, \s-1RSA\s0 *(*cb)(\s-1SSL\s0 *ssl, int export, int keylength));
451 The same as \fBSSL_CTX_set_tmp_rsa_callback\fR, except it operates on an \s-1SSL\s0
452 session instead of a context.
453 .IP "void \fBSSL_CTX_set_verify\fR(\s-1SSL_CTX\s0 *ctx, int mode, int (*cb);(void))" 4
454 .IX Item "void SSL_CTX_set_verify(SSL_CTX *ctx, int mode, int (*cb);(void))"
456 .IP "int \fBSSL_CTX_use_PrivateKey\fR(\s-1SSL_CTX\s0 *ctx, \s-1EVP_PKEY\s0 *pkey);" 4
457 .IX Item "int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);"
458 .IP "int \fBSSL_CTX_use_PrivateKey_ASN1\fR(int type, \s-1SSL_CTX\s0 *ctx, unsigned char *d, long len);" 4
459 .IX Item "int SSL_CTX_use_PrivateKey_ASN1(int type, SSL_CTX *ctx, unsigned char *d, long len);"
460 .IP "int \fBSSL_CTX_use_PrivateKey_file\fR(\s-1SSL_CTX\s0 *ctx, char *file, int type);" 4
461 .IX Item "int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, char *file, int type);"
462 .IP "int \fBSSL_CTX_use_RSAPrivateKey\fR(\s-1SSL_CTX\s0 *ctx, \s-1RSA\s0 *rsa);" 4
463 .IX Item "int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);"
464 .IP "int \fBSSL_CTX_use_RSAPrivateKey_ASN1\fR(\s-1SSL_CTX\s0 *ctx, unsigned char *d, long len);" 4
465 .IX Item "int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len);"
466 .IP "int \fBSSL_CTX_use_RSAPrivateKey_file\fR(\s-1SSL_CTX\s0 *ctx, char *file, int type);" 4
467 .IX Item "int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, char *file, int type);"
468 .IP "int \fBSSL_CTX_use_certificate\fR(\s-1SSL_CTX\s0 *ctx, X509 *x);" 4
469 .IX Item "int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);"
470 .IP "int \fBSSL_CTX_use_certificate_ASN1\fR(\s-1SSL_CTX\s0 *ctx, int len, unsigned char *d);" 4
471 .IX Item "int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, unsigned char *d);"
472 .IP "int \fBSSL_CTX_use_certificate_file\fR(\s-1SSL_CTX\s0 *ctx, char *file, int type);" 4
473 .IX Item "int SSL_CTX_use_certificate_file(SSL_CTX *ctx, char *file, int type);"
474 .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
475 .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));"
476 .IP "int \fBSSL_CTX_use_psk_identity_hint\fR(\s-1SSL_CTX\s0 *ctx, const char *hint);" 4
477 .IX Item "int SSL_CTX_use_psk_identity_hint(SSL_CTX *ctx, const char *hint);"
478 .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
479 .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));"
481 .SS "\s-1DEALING WITH SESSIONS\s0"
482 .IX Subsection "DEALING WITH SESSIONS"
483 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
484 sessions defined in the \fB\s-1SSL_SESSION\s0\fR structures.
485 .IP "int \fBSSL_SESSION_cmp\fR(const \s-1SSL_SESSION\s0 *a, const \s-1SSL_SESSION\s0 *b);" 4
486 .IX Item "int SSL_SESSION_cmp(const SSL_SESSION *a, const SSL_SESSION *b);"
488 .IP "void \fBSSL_SESSION_free\fR(\s-1SSL_SESSION\s0 *ss);" 4
489 .IX Item "void SSL_SESSION_free(SSL_SESSION *ss);"
490 .IP "char *\fBSSL_SESSION_get_app_data\fR(\s-1SSL_SESSION\s0 *s);" 4
491 .IX Item "char *SSL_SESSION_get_app_data(SSL_SESSION *s);"
492 .IP "char *\fBSSL_SESSION_get_ex_data\fR(const \s-1SSL_SESSION\s0 *s, int idx);" 4
493 .IX Item "char *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx);"
494 .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
495 .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))"
496 .IP "long \fBSSL_SESSION_get_time\fR(const \s-1SSL_SESSION\s0 *s);" 4
497 .IX Item "long SSL_SESSION_get_time(const SSL_SESSION *s);"
498 .IP "long \fBSSL_SESSION_get_timeout\fR(const \s-1SSL_SESSION\s0 *s);" 4
499 .IX Item "long SSL_SESSION_get_timeout(const SSL_SESSION *s);"
500 .IP "unsigned long \fBSSL_SESSION_hash\fR(const \s-1SSL_SESSION\s0 *a);" 4
501 .IX Item "unsigned long SSL_SESSION_hash(const SSL_SESSION *a);"
502 .IP "\s-1SSL_SESSION\s0 *\fBSSL_SESSION_new\fR(void);" 4
503 .IX Item "SSL_SESSION *SSL_SESSION_new(void);"
504 .IP "int \fBSSL_SESSION_print\fR(\s-1BIO\s0 *bp, const \s-1SSL_SESSION\s0 *x);" 4
505 .IX Item "int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x);"
506 .IP "int \fBSSL_SESSION_print_fp\fR(\s-1FILE\s0 *fp, const \s-1SSL_SESSION\s0 *x);" 4
507 .IX Item "int SSL_SESSION_print_fp(FILE *fp, const SSL_SESSION *x);"
508 .IP "void \fBSSL_SESSION_set_app_data\fR(\s-1SSL_SESSION\s0 *s, char *a);" 4
509 .IX Item "void SSL_SESSION_set_app_data(SSL_SESSION *s, char *a);"
510 .IP "int \fBSSL_SESSION_set_ex_data\fR(\s-1SSL_SESSION\s0 *s, int idx, char *arg);" 4
511 .IX Item "int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, char *arg);"
512 .IP "long \fBSSL_SESSION_set_time\fR(\s-1SSL_SESSION\s0 *s, long t);" 4
513 .IX Item "long SSL_SESSION_set_time(SSL_SESSION *s, long t);"
514 .IP "long \fBSSL_SESSION_set_timeout\fR(\s-1SSL_SESSION\s0 *s, long t);" 4
515 .IX Item "long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);"
517 .SS "\s-1DEALING WITH CONNECTIONS\s0"
518 .IX Subsection "DEALING WITH CONNECTIONS"
519 Here we document the various \s-1API\s0 functions which deal with the \s-1SSL/TLS\s0
520 connection defined in the \fB\s-1SSL\s0\fR structure.
521 .IP "int \fBSSL_accept\fR(\s-1SSL\s0 *ssl);" 4
522 .IX Item "int SSL_accept(SSL *ssl);"
524 .IP "int \fBSSL_add_dir_cert_subjects_to_stack\fR(\s-1STACK\s0 *stack, const char *dir);" 4
525 .IX Item "int SSL_add_dir_cert_subjects_to_stack(STACK *stack, const char *dir);"
526 .IP "int \fBSSL_add_file_cert_subjects_to_stack\fR(\s-1STACK\s0 *stack, const char *file);" 4
527 .IX Item "int SSL_add_file_cert_subjects_to_stack(STACK *stack, const char *file);"
528 .IP "int \fBSSL_add_client_CA\fR(\s-1SSL\s0 *ssl, X509 *x);" 4
529 .IX Item "int SSL_add_client_CA(SSL *ssl, X509 *x);"
530 .IP "char *\fBSSL_alert_desc_string\fR(int value);" 4
531 .IX Item "char *SSL_alert_desc_string(int value);"
532 .IP "char *\fBSSL_alert_desc_string_long\fR(int value);" 4
533 .IX Item "char *SSL_alert_desc_string_long(int value);"
534 .IP "char *\fBSSL_alert_type_string\fR(int value);" 4
535 .IX Item "char *SSL_alert_type_string(int value);"
536 .IP "char *\fBSSL_alert_type_string_long\fR(int value);" 4
537 .IX Item "char *SSL_alert_type_string_long(int value);"
538 .IP "int \fBSSL_check_private_key\fR(const \s-1SSL\s0 *ssl);" 4
539 .IX Item "int SSL_check_private_key(const SSL *ssl);"
540 .IP "void \fBSSL_clear\fR(\s-1SSL\s0 *ssl);" 4
541 .IX Item "void SSL_clear(SSL *ssl);"
542 .IP "long \fBSSL_clear_num_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
543 .IX Item "long SSL_clear_num_renegotiations(SSL *ssl);"
544 .IP "int \fBSSL_connect\fR(\s-1SSL\s0 *ssl);" 4
545 .IX Item "int SSL_connect(SSL *ssl);"
546 .IP "void \fBSSL_copy_session_id\fR(\s-1SSL\s0 *t, const \s-1SSL\s0 *f);" 4
547 .IX Item "void SSL_copy_session_id(SSL *t, const SSL *f);"
548 .IP "long \fBSSL_ctrl\fR(\s-1SSL\s0 *ssl, int cmd, long larg, char *parg);" 4
549 .IX Item "long SSL_ctrl(SSL *ssl, int cmd, long larg, char *parg);"
550 .IP "int \fBSSL_do_handshake\fR(\s-1SSL\s0 *ssl);" 4
551 .IX Item "int SSL_do_handshake(SSL *ssl);"
552 .IP "\s-1SSL\s0 *\fBSSL_dup\fR(\s-1SSL\s0 *ssl);" 4
553 .IX Item "SSL *SSL_dup(SSL *ssl);"
554 .IP "\s-1STACK\s0 *\fBSSL_dup_CA_list\fR(\s-1STACK\s0 *sk);" 4
555 .IX Item "STACK *SSL_dup_CA_list(STACK *sk);"
556 .IP "void \fBSSL_free\fR(\s-1SSL\s0 *ssl);" 4
557 .IX Item "void SSL_free(SSL *ssl);"
558 .IP "\s-1SSL_CTX\s0 *\fBSSL_get_SSL_CTX\fR(const \s-1SSL\s0 *ssl);" 4
559 .IX Item "SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);"
560 .IP "char *\fBSSL_get_app_data\fR(\s-1SSL\s0 *ssl);" 4
561 .IX Item "char *SSL_get_app_data(SSL *ssl);"
562 .IP "X509 *\fBSSL_get_certificate\fR(const \s-1SSL\s0 *ssl);" 4
563 .IX Item "X509 *SSL_get_certificate(const SSL *ssl);"
564 .IP "const char *\fBSSL_get_cipher\fR(const \s-1SSL\s0 *ssl);" 4
565 .IX Item "const char *SSL_get_cipher(const SSL *ssl);"
566 .IP "int \fBSSL_get_cipher_bits\fR(const \s-1SSL\s0 *ssl, int *alg_bits);" 4
567 .IX Item "int SSL_get_cipher_bits(const SSL *ssl, int *alg_bits);"
568 .IP "char *\fBSSL_get_cipher_list\fR(const \s-1SSL\s0 *ssl, int n);" 4
569 .IX Item "char *SSL_get_cipher_list(const SSL *ssl, int n);"
570 .IP "char *\fBSSL_get_cipher_name\fR(const \s-1SSL\s0 *ssl);" 4
571 .IX Item "char *SSL_get_cipher_name(const SSL *ssl);"
572 .IP "char *\fBSSL_get_cipher_version\fR(const \s-1SSL\s0 *ssl);" 4
573 .IX Item "char *SSL_get_cipher_version(const SSL *ssl);"
574 .IP "\s-1STACK\s0 *\fBSSL_get_ciphers\fR(const \s-1SSL\s0 *ssl);" 4
575 .IX Item "STACK *SSL_get_ciphers(const SSL *ssl);"
576 .IP "\s-1STACK\s0 *\fBSSL_get_client_CA_list\fR(const \s-1SSL\s0 *ssl);" 4
577 .IX Item "STACK *SSL_get_client_CA_list(const SSL *ssl);"
578 .IP "\s-1SSL_CIPHER\s0 *\fBSSL_get_current_cipher\fR(\s-1SSL\s0 *ssl);" 4
579 .IX Item "SSL_CIPHER *SSL_get_current_cipher(SSL *ssl);"
580 .IP "long \fBSSL_get_default_timeout\fR(const \s-1SSL\s0 *ssl);" 4
581 .IX Item "long SSL_get_default_timeout(const SSL *ssl);"
582 .IP "int \fBSSL_get_error\fR(const \s-1SSL\s0 *ssl, int i);" 4
583 .IX Item "int SSL_get_error(const SSL *ssl, int i);"
584 .IP "char *\fBSSL_get_ex_data\fR(const \s-1SSL\s0 *ssl, int idx);" 4
585 .IX Item "char *SSL_get_ex_data(const SSL *ssl, int idx);"
586 .IP "int \fBSSL_get_ex_data_X509_STORE_CTX_idx\fR(void);" 4
587 .IX Item "int SSL_get_ex_data_X509_STORE_CTX_idx(void);"
588 .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
589 .IX Item "int SSL_get_ex_new_index(long argl, char *argp, int (*new_func);(void), int (*dup_func)(void), void (*free_func)(void))"
590 .IP "int \fBSSL_get_fd\fR(const \s-1SSL\s0 *ssl);" 4
591 .IX Item "int SSL_get_fd(const SSL *ssl);"
592 .IP "void (*\fBSSL_get_info_callback\fR(const \s-1SSL\s0 *ssl);)()" 4
593 .IX Item "void (*SSL_get_info_callback(const SSL *ssl);)()"
594 .IP "\s-1STACK\s0 *\fBSSL_get_peer_cert_chain\fR(const \s-1SSL\s0 *ssl);" 4
595 .IX Item "STACK *SSL_get_peer_cert_chain(const SSL *ssl);"
596 .IP "X509 *\fBSSL_get_peer_certificate\fR(const \s-1SSL\s0 *ssl);" 4
597 .IX Item "X509 *SSL_get_peer_certificate(const SSL *ssl);"
598 .IP "\s-1EVP_PKEY\s0 *\fBSSL_get_privatekey\fR(\s-1SSL\s0 *ssl);" 4
599 .IX Item "EVP_PKEY *SSL_get_privatekey(SSL *ssl);"
600 .IP "int \fBSSL_get_quiet_shutdown\fR(const \s-1SSL\s0 *ssl);" 4
601 .IX Item "int SSL_get_quiet_shutdown(const SSL *ssl);"
602 .IP "\s-1BIO\s0 *\fBSSL_get_rbio\fR(const \s-1SSL\s0 *ssl);" 4
603 .IX Item "BIO *SSL_get_rbio(const SSL *ssl);"
604 .IP "int \fBSSL_get_read_ahead\fR(const \s-1SSL\s0 *ssl);" 4
605 .IX Item "int SSL_get_read_ahead(const SSL *ssl);"
606 .IP "\s-1SSL_SESSION\s0 *\fBSSL_get_session\fR(const \s-1SSL\s0 *ssl);" 4
607 .IX Item "SSL_SESSION *SSL_get_session(const SSL *ssl);"
608 .IP "char *\fBSSL_get_shared_ciphers\fR(const \s-1SSL\s0 *ssl, char *buf, int len);" 4
609 .IX Item "char *SSL_get_shared_ciphers(const SSL *ssl, char *buf, int len);"
610 .IP "int \fBSSL_get_shutdown\fR(const \s-1SSL\s0 *ssl);" 4
611 .IX Item "int SSL_get_shutdown(const SSL *ssl);"
612 .IP "const \s-1SSL_METHOD\s0 *\fBSSL_get_ssl_method\fR(\s-1SSL\s0 *ssl);" 4
613 .IX Item "const SSL_METHOD *SSL_get_ssl_method(SSL *ssl);"
614 .IP "int \fBSSL_get_state\fR(const \s-1SSL\s0 *ssl);" 4
615 .IX Item "int SSL_get_state(const SSL *ssl);"
616 .IP "long \fBSSL_get_time\fR(const \s-1SSL\s0 *ssl);" 4
617 .IX Item "long SSL_get_time(const SSL *ssl);"
618 .IP "long \fBSSL_get_timeout\fR(const \s-1SSL\s0 *ssl);" 4
619 .IX Item "long SSL_get_timeout(const SSL *ssl);"
620 .IP "int (*\fBSSL_get_verify_callback\fR(const \s-1SSL\s0 *ssl))(int,X509_STORE_CTX *)" 4
621 .IX Item "int (*SSL_get_verify_callback(const SSL *ssl))(int,X509_STORE_CTX *)"
622 .IP "int \fBSSL_get_verify_mode\fR(const \s-1SSL\s0 *ssl);" 4
623 .IX Item "int SSL_get_verify_mode(const SSL *ssl);"
624 .IP "long \fBSSL_get_verify_result\fR(const \s-1SSL\s0 *ssl);" 4
625 .IX Item "long SSL_get_verify_result(const SSL *ssl);"
626 .IP "char *\fBSSL_get_version\fR(const \s-1SSL\s0 *ssl);" 4
627 .IX Item "char *SSL_get_version(const SSL *ssl);"
628 .IP "\s-1BIO\s0 *\fBSSL_get_wbio\fR(const \s-1SSL\s0 *ssl);" 4
629 .IX Item "BIO *SSL_get_wbio(const SSL *ssl);"
630 .IP "int \fBSSL_in_accept_init\fR(\s-1SSL\s0 *ssl);" 4
631 .IX Item "int SSL_in_accept_init(SSL *ssl);"
632 .IP "int \fBSSL_in_before\fR(\s-1SSL\s0 *ssl);" 4
633 .IX Item "int SSL_in_before(SSL *ssl);"
634 .IP "int \fBSSL_in_connect_init\fR(\s-1SSL\s0 *ssl);" 4
635 .IX Item "int SSL_in_connect_init(SSL *ssl);"
636 .IP "int \fBSSL_in_init\fR(\s-1SSL\s0 *ssl);" 4
637 .IX Item "int SSL_in_init(SSL *ssl);"
638 .IP "int \fBSSL_is_init_finished\fR(\s-1SSL\s0 *ssl);" 4
639 .IX Item "int SSL_is_init_finished(SSL *ssl);"
640 .IP "\s-1STACK\s0 *\fBSSL_load_client_CA_file\fR(char *file);" 4
641 .IX Item "STACK *SSL_load_client_CA_file(char *file);"
642 .IP "void \fBSSL_load_error_strings\fR(void);" 4
643 .IX Item "void SSL_load_error_strings(void);"
644 .IP "\s-1SSL\s0 *\fBSSL_new\fR(\s-1SSL_CTX\s0 *ctx);" 4
645 .IX Item "SSL *SSL_new(SSL_CTX *ctx);"
646 .IP "long \fBSSL_num_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
647 .IX Item "long SSL_num_renegotiations(SSL *ssl);"
648 .IP "int \fBSSL_peek\fR(\s-1SSL\s0 *ssl, void *buf, int num);" 4
649 .IX Item "int SSL_peek(SSL *ssl, void *buf, int num);"
650 .IP "int \fBSSL_pending\fR(const \s-1SSL\s0 *ssl);" 4
651 .IX Item "int SSL_pending(const SSL *ssl);"
652 .IP "int \fBSSL_read\fR(\s-1SSL\s0 *ssl, void *buf, int num);" 4
653 .IX Item "int SSL_read(SSL *ssl, void *buf, int num);"
654 .IP "int \fBSSL_renegotiate\fR(\s-1SSL\s0 *ssl);" 4
655 .IX Item "int SSL_renegotiate(SSL *ssl);"
656 .IP "char *\fBSSL_rstate_string\fR(\s-1SSL\s0 *ssl);" 4
657 .IX Item "char *SSL_rstate_string(SSL *ssl);"
658 .IP "char *\fBSSL_rstate_string_long\fR(\s-1SSL\s0 *ssl);" 4
659 .IX Item "char *SSL_rstate_string_long(SSL *ssl);"
660 .IP "long \fBSSL_session_reused\fR(\s-1SSL\s0 *ssl);" 4
661 .IX Item "long SSL_session_reused(SSL *ssl);"
662 .IP "void \fBSSL_set_accept_state\fR(\s-1SSL\s0 *ssl);" 4
663 .IX Item "void SSL_set_accept_state(SSL *ssl);"
664 .IP "void \fBSSL_set_app_data\fR(\s-1SSL\s0 *ssl, char *arg);" 4
665 .IX Item "void SSL_set_app_data(SSL *ssl, char *arg);"
666 .IP "void \fBSSL_set_bio\fR(\s-1SSL\s0 *ssl, \s-1BIO\s0 *rbio, \s-1BIO\s0 *wbio);" 4
667 .IX Item "void SSL_set_bio(SSL *ssl, BIO *rbio, BIO *wbio);"
668 .IP "int \fBSSL_set_cipher_list\fR(\s-1SSL\s0 *ssl, char *str);" 4
669 .IX Item "int SSL_set_cipher_list(SSL *ssl, char *str);"
670 .IP "void \fBSSL_set_client_CA_list\fR(\s-1SSL\s0 *ssl, \s-1STACK\s0 *list);" 4
671 .IX Item "void SSL_set_client_CA_list(SSL *ssl, STACK *list);"
672 .IP "void \fBSSL_set_connect_state\fR(\s-1SSL\s0 *ssl);" 4
673 .IX Item "void SSL_set_connect_state(SSL *ssl);"
674 .IP "int \fBSSL_set_ex_data\fR(\s-1SSL\s0 *ssl, int idx, char *arg);" 4
675 .IX Item "int SSL_set_ex_data(SSL *ssl, int idx, char *arg);"
676 .IP "int \fBSSL_set_fd\fR(\s-1SSL\s0 *ssl, int fd);" 4
677 .IX Item "int SSL_set_fd(SSL *ssl, int fd);"
678 .IP "void \fBSSL_set_info_callback\fR(\s-1SSL\s0 *ssl, void (*cb);(void))" 4
679 .IX Item "void SSL_set_info_callback(SSL *ssl, void (*cb);(void))"
680 .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
681 .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));"
682 .IP "void \fBSSL_set_msg_callback_arg\fR(\s-1SSL\s0 *ctx, void *arg);" 4
683 .IX Item "void SSL_set_msg_callback_arg(SSL *ctx, void *arg);"
684 .IP "void \fBSSL_set_options\fR(\s-1SSL\s0 *ssl, unsigned long op);" 4
685 .IX Item "void SSL_set_options(SSL *ssl, unsigned long op);"
686 .IP "void \fBSSL_set_quiet_shutdown\fR(\s-1SSL\s0 *ssl, int mode);" 4
687 .IX Item "void SSL_set_quiet_shutdown(SSL *ssl, int mode);"
688 .IP "void \fBSSL_set_read_ahead\fR(\s-1SSL\s0 *ssl, int yes);" 4
689 .IX Item "void SSL_set_read_ahead(SSL *ssl, int yes);"
690 .IP "int \fBSSL_set_rfd\fR(\s-1SSL\s0 *ssl, int fd);" 4
691 .IX Item "int SSL_set_rfd(SSL *ssl, int fd);"
692 .IP "int \fBSSL_set_session\fR(\s-1SSL\s0 *ssl, \s-1SSL_SESSION\s0 *session);" 4
693 .IX Item "int SSL_set_session(SSL *ssl, SSL_SESSION *session);"
694 .IP "void \fBSSL_set_shutdown\fR(\s-1SSL\s0 *ssl, int mode);" 4
695 .IX Item "void SSL_set_shutdown(SSL *ssl, int mode);"
696 .IP "int \fBSSL_set_ssl_method\fR(\s-1SSL\s0 *ssl, const \s-1SSL_METHOD\s0 *meth);" 4
697 .IX Item "int SSL_set_ssl_method(SSL *ssl, const SSL_METHOD *meth);"
698 .IP "void \fBSSL_set_time\fR(\s-1SSL\s0 *ssl, long t);" 4
699 .IX Item "void SSL_set_time(SSL *ssl, long t);"
700 .IP "void \fBSSL_set_timeout\fR(\s-1SSL\s0 *ssl, long t);" 4
701 .IX Item "void SSL_set_timeout(SSL *ssl, long t);"
702 .IP "void \fBSSL_set_verify\fR(\s-1SSL\s0 *ssl, int mode, int (*callback);(void))" 4
703 .IX Item "void SSL_set_verify(SSL *ssl, int mode, int (*callback);(void))"
704 .IP "void \fBSSL_set_verify_result\fR(\s-1SSL\s0 *ssl, long arg);" 4
705 .IX Item "void SSL_set_verify_result(SSL *ssl, long arg);"
706 .IP "int \fBSSL_set_wfd\fR(\s-1SSL\s0 *ssl, int fd);" 4
707 .IX Item "int SSL_set_wfd(SSL *ssl, int fd);"
708 .IP "int \fBSSL_shutdown\fR(\s-1SSL\s0 *ssl);" 4
709 .IX Item "int SSL_shutdown(SSL *ssl);"
710 .IP "int \fBSSL_state\fR(const \s-1SSL\s0 *ssl);" 4
711 .IX Item "int SSL_state(const SSL *ssl);"
712 .IP "char *\fBSSL_state_string\fR(const \s-1SSL\s0 *ssl);" 4
713 .IX Item "char *SSL_state_string(const SSL *ssl);"
714 .IP "char *\fBSSL_state_string_long\fR(const \s-1SSL\s0 *ssl);" 4
715 .IX Item "char *SSL_state_string_long(const SSL *ssl);"
716 .IP "long \fBSSL_total_renegotiations\fR(\s-1SSL\s0 *ssl);" 4
717 .IX Item "long SSL_total_renegotiations(SSL *ssl);"
718 .IP "int \fBSSL_use_PrivateKey\fR(\s-1SSL\s0 *ssl, \s-1EVP_PKEY\s0 *pkey);" 4
719 .IX Item "int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);"
720 .IP "int \fBSSL_use_PrivateKey_ASN1\fR(int type, \s-1SSL\s0 *ssl, unsigned char *d, long len);" 4
721 .IX Item "int SSL_use_PrivateKey_ASN1(int type, SSL *ssl, unsigned char *d, long len);"
722 .IP "int \fBSSL_use_PrivateKey_file\fR(\s-1SSL\s0 *ssl, char *file, int type);" 4
723 .IX Item "int SSL_use_PrivateKey_file(SSL *ssl, char *file, int type);"
724 .IP "int \fBSSL_use_RSAPrivateKey\fR(\s-1SSL\s0 *ssl, \s-1RSA\s0 *rsa);" 4
725 .IX Item "int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);"
726 .IP "int \fBSSL_use_RSAPrivateKey_ASN1\fR(\s-1SSL\s0 *ssl, unsigned char *d, long len);" 4
727 .IX Item "int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);"
728 .IP "int \fBSSL_use_RSAPrivateKey_file\fR(\s-1SSL\s0 *ssl, char *file, int type);" 4
729 .IX Item "int SSL_use_RSAPrivateKey_file(SSL *ssl, char *file, int type);"
730 .IP "int \fBSSL_use_certificate\fR(\s-1SSL\s0 *ssl, X509 *x);" 4
731 .IX Item "int SSL_use_certificate(SSL *ssl, X509 *x);"
732 .IP "int \fBSSL_use_certificate_ASN1\fR(\s-1SSL\s0 *ssl, int len, unsigned char *d);" 4
733 .IX Item "int SSL_use_certificate_ASN1(SSL *ssl, int len, unsigned char *d);"
734 .IP "int \fBSSL_use_certificate_file\fR(\s-1SSL\s0 *ssl, char *file, int type);" 4
735 .IX Item "int SSL_use_certificate_file(SSL *ssl, char *file, int type);"
736 .IP "int \fBSSL_version\fR(const \s-1SSL\s0 *ssl);" 4
737 .IX Item "int SSL_version(const SSL *ssl);"
738 .IP "int \fBSSL_want\fR(const \s-1SSL\s0 *ssl);" 4
739 .IX Item "int SSL_want(const SSL *ssl);"
740 .IP "int \fBSSL_want_nothing\fR(const \s-1SSL\s0 *ssl);" 4
741 .IX Item "int SSL_want_nothing(const SSL *ssl);"
742 .IP "int \fBSSL_want_read\fR(const \s-1SSL\s0 *ssl);" 4
743 .IX Item "int SSL_want_read(const SSL *ssl);"
744 .IP "int \fBSSL_want_write\fR(const \s-1SSL\s0 *ssl);" 4
745 .IX Item "int SSL_want_write(const SSL *ssl);"
746 .IP "int \fBSSL_want_x509_lookup\fR(const \s-1SSL\s0 *ssl);" 4
747 .IX Item "int SSL_want_x509_lookup(const SSL *ssl);"
748 .IP "int \fBSSL_write\fR(\s-1SSL\s0 *ssl, const void *buf, int num);" 4
749 .IX Item "int SSL_write(SSL *ssl, const void *buf, int num);"
750 .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
751 .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));"
752 .IP "int \fBSSL_use_psk_identity_hint\fR(\s-1SSL\s0 *ssl, const char *hint);" 4
753 .IX Item "int SSL_use_psk_identity_hint(SSL *ssl, const char *hint);"
754 .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
755 .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));"
756 .IP "const char *\fBSSL_get_psk_identity_hint\fR(\s-1SSL\s0 *ssl);" 4
757 .IX Item "const char *SSL_get_psk_identity_hint(SSL *ssl);"
758 .IP "const char *\fBSSL_get_psk_identity\fR(\s-1SSL\s0 *ssl);" 4
759 .IX Item "const char *SSL_get_psk_identity(SSL *ssl);"
762 .IX Header "SEE ALSO"
763 \&\fIopenssl\fR\|(1), \fIcrypto\fR\|(3),
764 \&\fISSL_accept\fR\|(3), \fISSL_clear\fR\|(3),
765 \&\fISSL_connect\fR\|(3),
766 \&\fISSL_CIPHER_get_name\fR\|(3),
767 \&\fISSL_COMP_add_compression_method\fR\|(3),
768 \&\fISSL_CTX_add_extra_chain_cert\fR\|(3),
769 \&\fISSL_CTX_add_session\fR\|(3),
770 \&\fISSL_CTX_ctrl\fR\|(3),
771 \&\fISSL_CTX_flush_sessions\fR\|(3),
772 \&\fISSL_CTX_get_ex_new_index\fR\|(3),
773 \&\fISSL_CTX_get_verify_mode\fR\|(3),
774 \&\fISSL_CTX_load_verify_locations\fR\|(3)
775 \&\fISSL_CTX_new\fR\|(3),
776 \&\fISSL_CTX_sess_number\fR\|(3),
777 \&\fISSL_CTX_sess_set_cache_size\fR\|(3),
778 \&\fISSL_CTX_sess_set_get_cb\fR\|(3),
779 \&\fISSL_CTX_sessions\fR\|(3),
780 \&\fISSL_CTX_set_cert_store\fR\|(3),
781 \&\fISSL_CTX_set_cert_verify_callback\fR\|(3),
782 \&\fISSL_CTX_set_cipher_list\fR\|(3),
783 \&\fISSL_CTX_set_client_CA_list\fR\|(3),
784 \&\fISSL_CTX_set_client_cert_cb\fR\|(3),
785 \&\fISSL_CTX_set_default_passwd_cb\fR\|(3),
786 \&\fISSL_CTX_set_generate_session_id\fR\|(3),
787 \&\fISSL_CTX_set_info_callback\fR\|(3),
788 \&\fISSL_CTX_set_max_cert_list\fR\|(3),
789 \&\fISSL_CTX_set_mode\fR\|(3),
790 \&\fISSL_CTX_set_msg_callback\fR\|(3),
791 \&\fISSL_CTX_set_options\fR\|(3),
792 \&\fISSL_CTX_set_quiet_shutdown\fR\|(3),
793 \&\fISSL_CTX_set_read_ahead\fR\|(3),
794 \&\fISSL_CTX_set_session_cache_mode\fR\|(3),
795 \&\fISSL_CTX_set_session_id_context\fR\|(3),
796 \&\fISSL_CTX_set_ssl_version\fR\|(3),
797 \&\fISSL_CTX_set_timeout\fR\|(3),
798 \&\fISSL_CTX_set_tmp_rsa_callback\fR\|(3),
799 \&\fISSL_CTX_set_tmp_dh_callback\fR\|(3),
800 \&\fISSL_CTX_set_verify\fR\|(3),
801 \&\fISSL_CTX_use_certificate\fR\|(3),
802 \&\fISSL_alert_type_string\fR\|(3),
803 \&\fISSL_do_handshake\fR\|(3),
804 \&\fISSL_get_SSL_CTX\fR\|(3),
805 \&\fISSL_get_ciphers\fR\|(3),
806 \&\fISSL_get_client_CA_list\fR\|(3),
807 \&\fISSL_get_default_timeout\fR\|(3),
808 \&\fISSL_get_error\fR\|(3),
809 \&\fISSL_get_ex_data_X509_STORE_CTX_idx\fR\|(3),
810 \&\fISSL_get_ex_new_index\fR\|(3),
811 \&\fISSL_get_fd\fR\|(3),
812 \&\fISSL_get_peer_cert_chain\fR\|(3),
813 \&\fISSL_get_rbio\fR\|(3),
814 \&\fISSL_get_session\fR\|(3),
815 \&\fISSL_get_verify_result\fR\|(3),
816 \&\fISSL_get_version\fR\|(3),
817 \&\fISSL_library_init\fR\|(3),
818 \&\fISSL_load_client_CA_file\fR\|(3),
819 \&\fISSL_new\fR\|(3),
820 \&\fISSL_pending\fR\|(3),
821 \&\fISSL_read\fR\|(3),
822 \&\fISSL_rstate_string\fR\|(3),
823 \&\fISSL_session_reused\fR\|(3),
824 \&\fISSL_set_bio\fR\|(3),
825 \&\fISSL_set_connect_state\fR\|(3),
826 \&\fISSL_set_fd\fR\|(3),
827 \&\fISSL_set_session\fR\|(3),
828 \&\fISSL_set_shutdown\fR\|(3),
829 \&\fISSL_shutdown\fR\|(3),
830 \&\fISSL_state_string\fR\|(3),
831 \&\fISSL_want\fR\|(3),
832 \&\fISSL_write\fR\|(3),
833 \&\fISSL_SESSION_free\fR\|(3),
834 \&\fISSL_SESSION_get_ex_new_index\fR\|(3),
835 \&\fISSL_SESSION_get_time\fR\|(3),
836 \&\fId2i_SSL_SESSION\fR\|(3),
837 \&\fISSL_CTX_set_psk_client_callback\fR\|(3),
838 \&\fISSL_CTX_use_psk_identity_hint\fR\|(3),
839 \&\fISSL_get_psk_identity\fR\|(3)
842 The \fIssl\fR\|(3) document appeared in OpenSSL 0.9.2