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