williamr@2
|
1 |
/* ssl/ssl.h */
|
williamr@2
|
2 |
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
*
|
williamr@2
|
5 |
* This package is an SSL implementation written
|
williamr@2
|
6 |
* by Eric Young (eay@cryptsoft.com).
|
williamr@2
|
7 |
* The implementation was written so as to conform with Netscapes SSL.
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* This library is free for commercial and non-commercial use as long as
|
williamr@2
|
10 |
* the following conditions are aheared to. The following conditions
|
williamr@2
|
11 |
* apply to all code found in this distribution, be it the RC4, RSA,
|
williamr@2
|
12 |
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
|
williamr@2
|
13 |
* included with this distribution is covered by the same copyright terms
|
williamr@2
|
14 |
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
* Copyright remains Eric Young's, and as such any Copyright notices in
|
williamr@2
|
17 |
* the code are not to be removed.
|
williamr@2
|
18 |
* If this package is used in a product, Eric Young should be given attribution
|
williamr@2
|
19 |
* as the author of the parts of the library used.
|
williamr@2
|
20 |
* This can be in the form of a textual message at program startup or
|
williamr@2
|
21 |
* in documentation (online or textual) provided with the package.
|
williamr@2
|
22 |
*
|
williamr@2
|
23 |
* Redistribution and use in source and binary forms, with or without
|
williamr@2
|
24 |
* modification, are permitted provided that the following conditions
|
williamr@2
|
25 |
* are met:
|
williamr@2
|
26 |
* 1. Redistributions of source code must retain the copyright
|
williamr@2
|
27 |
* notice, this list of conditions and the following disclaimer.
|
williamr@2
|
28 |
* 2. Redistributions in binary form must reproduce the above copyright
|
williamr@2
|
29 |
* notice, this list of conditions and the following disclaimer in the
|
williamr@2
|
30 |
* documentation and/or other materials provided with the distribution.
|
williamr@2
|
31 |
* 3. All advertising materials mentioning features or use of this software
|
williamr@2
|
32 |
* must display the following acknowledgement:
|
williamr@2
|
33 |
* "This product includes cryptographic software written by
|
williamr@2
|
34 |
* Eric Young (eay@cryptsoft.com)"
|
williamr@2
|
35 |
* The word 'cryptographic' can be left out if the rouines from the library
|
williamr@2
|
36 |
* being used are not cryptographic related :-).
|
williamr@2
|
37 |
* 4. If you include any Windows specific code (or a derivative thereof) from
|
williamr@2
|
38 |
* the apps directory (application code) you must include an acknowledgement:
|
williamr@2
|
39 |
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
|
williamr@2
|
40 |
*
|
williamr@2
|
41 |
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
|
williamr@2
|
42 |
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
williamr@2
|
43 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
williamr@2
|
44 |
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
williamr@2
|
45 |
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
williamr@2
|
46 |
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
williamr@2
|
47 |
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
williamr@2
|
48 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
williamr@2
|
49 |
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
williamr@2
|
50 |
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
williamr@2
|
51 |
* SUCH DAMAGE.
|
williamr@2
|
52 |
*
|
williamr@2
|
53 |
* The licence and distribution terms for any publically available version or
|
williamr@2
|
54 |
* derivative of this code cannot be changed. i.e. this code cannot simply be
|
williamr@2
|
55 |
* copied and put under another distribution licence
|
williamr@2
|
56 |
* [including the GNU Public Licence.]
|
williamr@2
|
57 |
*/
|
williamr@2
|
58 |
/* ====================================================================
|
williamr@2
|
59 |
* Copyright (c) 1998-2001 The OpenSSL Project. All rights reserved.
|
williamr@2
|
60 |
*
|
williamr@2
|
61 |
* Redistribution and use in source and binary forms, with or without
|
williamr@2
|
62 |
* modification, are permitted provided that the following conditions
|
williamr@2
|
63 |
* are met:
|
williamr@2
|
64 |
*
|
williamr@2
|
65 |
* 1. Redistributions of source code must retain the above copyright
|
williamr@2
|
66 |
* notice, this list of conditions and the following disclaimer.
|
williamr@2
|
67 |
*
|
williamr@2
|
68 |
* 2. Redistributions in binary form must reproduce the above copyright
|
williamr@2
|
69 |
* notice, this list of conditions and the following disclaimer in
|
williamr@2
|
70 |
* the documentation and/or other materials provided with the
|
williamr@2
|
71 |
* distribution.
|
williamr@2
|
72 |
*
|
williamr@2
|
73 |
* 3. All advertising materials mentioning features or use of this
|
williamr@2
|
74 |
* software must display the following acknowledgment:
|
williamr@2
|
75 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
76 |
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
williamr@2
|
77 |
*
|
williamr@2
|
78 |
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
williamr@2
|
79 |
* endorse or promote products derived from this software without
|
williamr@2
|
80 |
* prior written permission. For written permission, please contact
|
williamr@2
|
81 |
* openssl-core@openssl.org.
|
williamr@2
|
82 |
*
|
williamr@2
|
83 |
* 5. Products derived from this software may not be called "OpenSSL"
|
williamr@2
|
84 |
* nor may "OpenSSL" appear in their names without prior written
|
williamr@2
|
85 |
* permission of the OpenSSL Project.
|
williamr@2
|
86 |
*
|
williamr@2
|
87 |
* 6. Redistributions of any form whatsoever must retain the following
|
williamr@2
|
88 |
* acknowledgment:
|
williamr@2
|
89 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
90 |
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
williamr@2
|
91 |
*
|
williamr@2
|
92 |
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
williamr@2
|
93 |
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
williamr@2
|
94 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
williamr@2
|
95 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
williamr@2
|
96 |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
williamr@2
|
97 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
williamr@2
|
98 |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
williamr@2
|
99 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
williamr@2
|
100 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
williamr@2
|
101 |
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
williamr@2
|
102 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
williamr@2
|
103 |
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
williamr@2
|
104 |
* ====================================================================
|
williamr@2
|
105 |
*
|
williamr@2
|
106 |
* This product includes cryptographic software written by Eric Young
|
williamr@2
|
107 |
* (eay@cryptsoft.com). This product includes software written by Tim
|
williamr@2
|
108 |
* Hudson (tjh@cryptsoft.com).
|
williamr@2
|
109 |
*
|
williamr@2
|
110 |
*/
|
williamr@2
|
111 |
/* ====================================================================
|
williamr@2
|
112 |
* Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
|
williamr@2
|
113 |
*
|
williamr@2
|
114 |
* Redistribution and use in source and binary forms, with or without
|
williamr@2
|
115 |
* modification, are permitted provided that the following conditions
|
williamr@2
|
116 |
* are met:
|
williamr@2
|
117 |
*
|
williamr@2
|
118 |
* 1. Redistributions of source code must retain the above copyright
|
williamr@2
|
119 |
* notice, this list of conditions and the following disclaimer.
|
williamr@2
|
120 |
*
|
williamr@2
|
121 |
* 2. Redistributions in binary form must reproduce the above copyright
|
williamr@2
|
122 |
* notice, this list of conditions and the following disclaimer in
|
williamr@2
|
123 |
* the documentation and/or other materials provided with the
|
williamr@2
|
124 |
* distribution.
|
williamr@2
|
125 |
*
|
williamr@2
|
126 |
* 3. All advertising materials mentioning features or use of this
|
williamr@2
|
127 |
* software must display the following acknowledgment:
|
williamr@2
|
128 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
129 |
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
|
williamr@2
|
130 |
*
|
williamr@2
|
131 |
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
|
williamr@2
|
132 |
* endorse or promote products derived from this software without
|
williamr@2
|
133 |
* prior written permission. For written permission, please contact
|
williamr@2
|
134 |
* openssl-core@openssl.org.
|
williamr@2
|
135 |
*
|
williamr@2
|
136 |
* 5. Products derived from this software may not be called "OpenSSL"
|
williamr@2
|
137 |
* nor may "OpenSSL" appear in their names without prior written
|
williamr@2
|
138 |
* permission of the OpenSSL Project.
|
williamr@2
|
139 |
*
|
williamr@2
|
140 |
* 6. Redistributions of any form whatsoever must retain the following
|
williamr@2
|
141 |
* acknowledgment:
|
williamr@2
|
142 |
* "This product includes software developed by the OpenSSL Project
|
williamr@2
|
143 |
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
|
williamr@2
|
144 |
*
|
williamr@2
|
145 |
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
|
williamr@2
|
146 |
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
williamr@2
|
147 |
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
williamr@2
|
148 |
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
|
williamr@2
|
149 |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
williamr@2
|
150 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
williamr@2
|
151 |
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
williamr@2
|
152 |
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
williamr@2
|
153 |
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
williamr@2
|
154 |
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
williamr@2
|
155 |
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
williamr@2
|
156 |
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
williamr@2
|
157 |
* ====================================================================
|
williamr@2
|
158 |
*
|
williamr@2
|
159 |
* This product includes cryptographic software written by Eric Young
|
williamr@2
|
160 |
* (eay@cryptsoft.com). This product includes software written by Tim
|
williamr@2
|
161 |
* Hudson (tjh@cryptsoft.com).
|
williamr@2
|
162 |
*
|
williamr@2
|
163 |
*/
|
williamr@2
|
164 |
/* ====================================================================
|
williamr@2
|
165 |
* Copyright 2002 Sun Microsystems, Inc. ALL RIGHTS RESERVED.
|
williamr@2
|
166 |
* ECC cipher suite support in OpenSSL originally developed by
|
williamr@2
|
167 |
* SUN MICROSYSTEMS, INC., and contributed to the OpenSSL project.
|
williamr@2
|
168 |
*/
|
williamr@2
|
169 |
|
williamr@2
|
170 |
#ifndef HEADER_SSL_H
|
williamr@2
|
171 |
#define HEADER_SSL_H
|
williamr@2
|
172 |
|
williamr@2
|
173 |
#if (defined(__SYMBIAN32__) && !defined(SYMBIAN))
|
williamr@2
|
174 |
#define SYMBIAN
|
williamr@2
|
175 |
#endif
|
williamr@2
|
176 |
|
williamr@2
|
177 |
#include <openssl/e_os2.h>
|
williamr@2
|
178 |
|
williamr@2
|
179 |
#ifndef OPENSSL_NO_COMP
|
williamr@2
|
180 |
#include <openssl/comp.h>
|
williamr@2
|
181 |
#endif
|
williamr@2
|
182 |
#ifndef OPENSSL_NO_BIO
|
williamr@2
|
183 |
#include <openssl/bio.h>
|
williamr@2
|
184 |
#endif
|
williamr@2
|
185 |
#ifndef OPENSSL_NO_DEPRECATED
|
williamr@2
|
186 |
#ifndef OPENSSL_NO_X509
|
williamr@2
|
187 |
#include <openssl/x509.h>
|
williamr@2
|
188 |
#endif
|
williamr@2
|
189 |
#include <openssl/crypto.h>
|
williamr@2
|
190 |
#include <openssl/lhash.h>
|
williamr@2
|
191 |
#include <openssl/buffer.h>
|
williamr@2
|
192 |
#endif
|
williamr@2
|
193 |
#include <openssl/pem.h>
|
williamr@2
|
194 |
|
williamr@2
|
195 |
#include <openssl/kssl.h>
|
williamr@2
|
196 |
#include <openssl/safestack.h>
|
williamr@2
|
197 |
#include <openssl/symhacks.h>
|
williamr@2
|
198 |
|
williamr@2
|
199 |
#ifdef __cplusplus
|
williamr@2
|
200 |
extern "C" {
|
williamr@2
|
201 |
#endif
|
williamr@2
|
202 |
|
williamr@2
|
203 |
/* SSLeay version number for ASN.1 encoding of the session information */
|
williamr@2
|
204 |
/* Version 0 - initial version
|
williamr@2
|
205 |
* Version 1 - added the optional peer certificate
|
williamr@2
|
206 |
*/
|
williamr@2
|
207 |
#define SSL_SESSION_ASN1_VERSION 0x0001
|
williamr@2
|
208 |
|
williamr@2
|
209 |
/* text strings for the ciphers */
|
williamr@2
|
210 |
#define SSL_TXT_NULL_WITH_MD5 SSL2_TXT_NULL_WITH_MD5
|
williamr@2
|
211 |
#define SSL_TXT_RC4_128_WITH_MD5 SSL2_TXT_RC4_128_WITH_MD5
|
williamr@2
|
212 |
#define SSL_TXT_RC4_128_EXPORT40_WITH_MD5 SSL2_TXT_RC4_128_EXPORT40_WITH_MD5
|
williamr@2
|
213 |
#define SSL_TXT_RC2_128_CBC_WITH_MD5 SSL2_TXT_RC2_128_CBC_WITH_MD5
|
williamr@2
|
214 |
#define SSL_TXT_RC2_128_CBC_EXPORT40_WITH_MD5 SSL2_TXT_RC2_128_CBC_EXPORT40_WITH_MD5
|
williamr@2
|
215 |
#define SSL_TXT_IDEA_128_CBC_WITH_MD5 SSL2_TXT_IDEA_128_CBC_WITH_MD5
|
williamr@2
|
216 |
#define SSL_TXT_DES_64_CBC_WITH_MD5 SSL2_TXT_DES_64_CBC_WITH_MD5
|
williamr@2
|
217 |
#define SSL_TXT_DES_64_CBC_WITH_SHA SSL2_TXT_DES_64_CBC_WITH_SHA
|
williamr@2
|
218 |
#define SSL_TXT_DES_192_EDE3_CBC_WITH_MD5 SSL2_TXT_DES_192_EDE3_CBC_WITH_MD5
|
williamr@2
|
219 |
#define SSL_TXT_DES_192_EDE3_CBC_WITH_SHA SSL2_TXT_DES_192_EDE3_CBC_WITH_SHA
|
williamr@2
|
220 |
|
williamr@2
|
221 |
/* VRS Additional Kerberos5 entries
|
williamr@2
|
222 |
*/
|
williamr@2
|
223 |
#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA
|
williamr@2
|
224 |
#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
|
williamr@2
|
225 |
#define SSL_TXT_KRB5_RC4_128_SHA SSL3_TXT_KRB5_RC4_128_SHA
|
williamr@2
|
226 |
#define SSL_TXT_KRB5_IDEA_128_CBC_SHA SSL3_TXT_KRB5_IDEA_128_CBC_SHA
|
williamr@2
|
227 |
#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5
|
williamr@2
|
228 |
#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
|
williamr@2
|
229 |
#define SSL_TXT_KRB5_RC4_128_MD5 SSL3_TXT_KRB5_RC4_128_MD5
|
williamr@2
|
230 |
#define SSL_TXT_KRB5_IDEA_128_CBC_MD5 SSL3_TXT_KRB5_IDEA_128_CBC_MD5
|
williamr@2
|
231 |
|
williamr@2
|
232 |
#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA
|
williamr@2
|
233 |
#define SSL_TXT_KRB5_RC2_40_CBC_SHA SSL3_TXT_KRB5_RC2_40_CBC_SHA
|
williamr@2
|
234 |
#define SSL_TXT_KRB5_RC4_40_SHA SSL3_TXT_KRB5_RC4_40_SHA
|
williamr@2
|
235 |
#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5
|
williamr@2
|
236 |
#define SSL_TXT_KRB5_RC2_40_CBC_MD5 SSL3_TXT_KRB5_RC2_40_CBC_MD5
|
williamr@2
|
237 |
#define SSL_TXT_KRB5_RC4_40_MD5 SSL3_TXT_KRB5_RC4_40_MD5
|
williamr@2
|
238 |
|
williamr@2
|
239 |
#define SSL_TXT_KRB5_DES_40_CBC_SHA SSL3_TXT_KRB5_DES_40_CBC_SHA
|
williamr@2
|
240 |
#define SSL_TXT_KRB5_DES_40_CBC_MD5 SSL3_TXT_KRB5_DES_40_CBC_MD5
|
williamr@2
|
241 |
#define SSL_TXT_KRB5_DES_64_CBC_SHA SSL3_TXT_KRB5_DES_64_CBC_SHA
|
williamr@2
|
242 |
#define SSL_TXT_KRB5_DES_64_CBC_MD5 SSL3_TXT_KRB5_DES_64_CBC_MD5
|
williamr@2
|
243 |
#define SSL_TXT_KRB5_DES_192_CBC3_SHA SSL3_TXT_KRB5_DES_192_CBC3_SHA
|
williamr@2
|
244 |
#define SSL_TXT_KRB5_DES_192_CBC3_MD5 SSL3_TXT_KRB5_DES_192_CBC3_MD5
|
williamr@2
|
245 |
#define SSL_MAX_KRB5_PRINCIPAL_LENGTH 256
|
williamr@2
|
246 |
|
williamr@2
|
247 |
#define SSL_MAX_SSL_SESSION_ID_LENGTH 32
|
williamr@2
|
248 |
#define SSL_MAX_SID_CTX_LENGTH 32
|
williamr@2
|
249 |
|
williamr@2
|
250 |
#define SSL_MIN_RSA_MODULUS_LENGTH_IN_BYTES (512/8)
|
williamr@2
|
251 |
#define SSL_MAX_KEY_ARG_LENGTH 8
|
williamr@2
|
252 |
#define SSL_MAX_MASTER_KEY_LENGTH 48
|
williamr@2
|
253 |
|
williamr@2
|
254 |
/* These are used to specify which ciphers to use and not to use */
|
williamr@2
|
255 |
#define SSL_TXT_LOW "LOW"
|
williamr@2
|
256 |
#define SSL_TXT_MEDIUM "MEDIUM"
|
williamr@2
|
257 |
#define SSL_TXT_HIGH "HIGH"
|
williamr@2
|
258 |
#define SSL_TXT_kFZA "kFZA"
|
williamr@2
|
259 |
#define SSL_TXT_aFZA "aFZA"
|
williamr@2
|
260 |
#define SSL_TXT_eFZA "eFZA"
|
williamr@2
|
261 |
#define SSL_TXT_FZA "FZA"
|
williamr@2
|
262 |
|
williamr@2
|
263 |
#define SSL_TXT_aNULL "aNULL"
|
williamr@2
|
264 |
#define SSL_TXT_eNULL "eNULL"
|
williamr@2
|
265 |
#define SSL_TXT_NULL "NULL"
|
williamr@2
|
266 |
|
williamr@2
|
267 |
#define SSL_TXT_kKRB5 "kKRB5"
|
williamr@2
|
268 |
#define SSL_TXT_aKRB5 "aKRB5"
|
williamr@2
|
269 |
#define SSL_TXT_KRB5 "KRB5"
|
williamr@2
|
270 |
|
williamr@2
|
271 |
#define SSL_TXT_kRSA "kRSA"
|
williamr@2
|
272 |
#define SSL_TXT_kDHr "kDHr"
|
williamr@2
|
273 |
#define SSL_TXT_kDHd "kDHd"
|
williamr@2
|
274 |
#define SSL_TXT_kEDH "kEDH"
|
williamr@2
|
275 |
#define SSL_TXT_aRSA "aRSA"
|
williamr@2
|
276 |
#define SSL_TXT_aDSS "aDSS"
|
williamr@2
|
277 |
#define SSL_TXT_aDH "aDH"
|
williamr@2
|
278 |
#define SSL_TXT_DSS "DSS"
|
williamr@2
|
279 |
#define SSL_TXT_DH "DH"
|
williamr@2
|
280 |
#define SSL_TXT_EDH "EDH"
|
williamr@2
|
281 |
#define SSL_TXT_ADH "ADH"
|
williamr@2
|
282 |
#define SSL_TXT_RSA "RSA"
|
williamr@2
|
283 |
#define SSL_TXT_DES "DES"
|
williamr@2
|
284 |
#define SSL_TXT_3DES "3DES"
|
williamr@2
|
285 |
#define SSL_TXT_RC4 "RC4"
|
williamr@2
|
286 |
#define SSL_TXT_RC2 "RC2"
|
williamr@2
|
287 |
#define SSL_TXT_IDEA "IDEA"
|
williamr@2
|
288 |
#define SSL_TXT_AES "AES"
|
williamr@2
|
289 |
#define SSL_TXT_MD5 "MD5"
|
williamr@2
|
290 |
#define SSL_TXT_SHA1 "SHA1"
|
williamr@2
|
291 |
#define SSL_TXT_SHA "SHA"
|
williamr@2
|
292 |
#define SSL_TXT_EXP "EXP"
|
williamr@2
|
293 |
#define SSL_TXT_EXPORT "EXPORT"
|
williamr@2
|
294 |
#define SSL_TXT_EXP40 "EXPORT40"
|
williamr@2
|
295 |
#define SSL_TXT_EXP56 "EXPORT56"
|
williamr@2
|
296 |
#define SSL_TXT_SSLV2 "SSLv2"
|
williamr@2
|
297 |
#define SSL_TXT_SSLV3 "SSLv3"
|
williamr@2
|
298 |
#define SSL_TXT_TLSV1 "TLSv1"
|
williamr@2
|
299 |
#define SSL_TXT_ALL "ALL"
|
williamr@2
|
300 |
#define SSL_TXT_ECC "ECCdraft" /* ECC ciphersuites are not yet official */
|
williamr@2
|
301 |
|
williamr@2
|
302 |
/*
|
williamr@2
|
303 |
* COMPLEMENTOF* definitions. These identifiers are used to (de-select)
|
williamr@2
|
304 |
* ciphers normally not being used.
|
williamr@2
|
305 |
* Example: "RC4" will activate all ciphers using RC4 including ciphers
|
williamr@2
|
306 |
* without authentication, which would normally disabled by DEFAULT (due
|
williamr@2
|
307 |
* the "!ADH" being part of default). Therefore "RC4:!COMPLEMENTOFDEFAULT"
|
williamr@2
|
308 |
* will make sure that it is also disabled in the specific selection.
|
williamr@2
|
309 |
* COMPLEMENTOF* identifiers are portable between version, as adjustments
|
williamr@2
|
310 |
* to the default cipher setup will also be included here.
|
williamr@2
|
311 |
*
|
williamr@2
|
312 |
* COMPLEMENTOFDEFAULT does not experience the same special treatment that
|
williamr@2
|
313 |
* DEFAULT gets, as only selection is being done and no sorting as needed
|
williamr@2
|
314 |
* for DEFAULT.
|
williamr@2
|
315 |
*/
|
williamr@2
|
316 |
#define SSL_TXT_CMPALL "COMPLEMENTOFALL"
|
williamr@2
|
317 |
#define SSL_TXT_CMPDEF "COMPLEMENTOFDEFAULT"
|
williamr@2
|
318 |
|
williamr@2
|
319 |
/* The following cipher list is used by default.
|
williamr@2
|
320 |
* It also is substituted when an application-defined cipher list string
|
williamr@2
|
321 |
* starts with 'DEFAULT'. */
|
williamr@2
|
322 |
#define SSL_DEFAULT_CIPHER_LIST "AES:ALL:!aNULL:!eNULL:+RC4:@STRENGTH" /* low priority for RC4 */
|
williamr@2
|
323 |
|
williamr@2
|
324 |
/* Used in SSL_set_shutdown()/SSL_get_shutdown(); */
|
williamr@2
|
325 |
#define SSL_SENT_SHUTDOWN 1
|
williamr@2
|
326 |
#define SSL_RECEIVED_SHUTDOWN 2
|
williamr@2
|
327 |
|
williamr@2
|
328 |
#ifdef __cplusplus
|
williamr@2
|
329 |
}
|
williamr@2
|
330 |
#endif
|
williamr@2
|
331 |
|
williamr@2
|
332 |
#ifdef __cplusplus
|
williamr@2
|
333 |
extern "C" {
|
williamr@2
|
334 |
#endif
|
williamr@2
|
335 |
|
williamr@2
|
336 |
#if (defined(OPENSSL_NO_RSA) || defined(OPENSSL_NO_MD5)) && !defined(OPENSSL_NO_SSL2)
|
williamr@2
|
337 |
#define OPENSSL_NO_SSL2
|
williamr@2
|
338 |
#endif
|
williamr@2
|
339 |
|
williamr@2
|
340 |
#define SSL_FILETYPE_ASN1 X509_FILETYPE_ASN1
|
williamr@2
|
341 |
#define SSL_FILETYPE_PEM X509_FILETYPE_PEM
|
williamr@2
|
342 |
|
williamr@2
|
343 |
/* This is needed to stop compilers complaining about the
|
williamr@2
|
344 |
* 'struct ssl_st *' function parameters used to prototype callbacks
|
williamr@2
|
345 |
* in SSL_CTX. */
|
williamr@2
|
346 |
typedef struct ssl_st *ssl_crock_st;
|
williamr@2
|
347 |
|
williamr@2
|
348 |
/* used to hold info on the particular ciphers used */
|
williamr@2
|
349 |
typedef struct ssl_cipher_st
|
williamr@2
|
350 |
{
|
williamr@2
|
351 |
int valid;
|
williamr@2
|
352 |
const char *name; /* text name */
|
williamr@2
|
353 |
unsigned long id; /* id, 4 bytes, first is version */
|
williamr@2
|
354 |
unsigned long algorithms; /* what ciphers are used */
|
williamr@2
|
355 |
unsigned long algo_strength; /* strength and export flags */
|
williamr@2
|
356 |
unsigned long algorithm2; /* Extra flags */
|
williamr@2
|
357 |
int strength_bits; /* Number of bits really used */
|
williamr@2
|
358 |
int alg_bits; /* Number of bits for algorithm */
|
williamr@2
|
359 |
unsigned long mask; /* used for matching */
|
williamr@2
|
360 |
unsigned long mask_strength; /* also used for matching */
|
williamr@2
|
361 |
} SSL_CIPHER;
|
williamr@2
|
362 |
|
williamr@2
|
363 |
DECLARE_STACK_OF(SSL_CIPHER)
|
williamr@2
|
364 |
|
williamr@2
|
365 |
typedef struct ssl_st SSL;
|
williamr@2
|
366 |
typedef struct ssl_ctx_st SSL_CTX;
|
williamr@2
|
367 |
|
williamr@2
|
368 |
/* Used to hold functions for SSLv2 or SSLv3/TLSv1 functions */
|
williamr@2
|
369 |
typedef struct ssl_method_st
|
williamr@2
|
370 |
{
|
williamr@2
|
371 |
int version;
|
williamr@2
|
372 |
int (*ssl_new)(SSL *s);
|
williamr@2
|
373 |
void (*ssl_clear)(SSL *s);
|
williamr@2
|
374 |
void (*ssl_free)(SSL *s);
|
williamr@2
|
375 |
int (*ssl_accept)(SSL *s);
|
williamr@2
|
376 |
int (*ssl_connect)(SSL *s);
|
williamr@2
|
377 |
int (*ssl_read)(SSL *s,void *buf,int len);
|
williamr@2
|
378 |
int (*ssl_peek)(SSL *s,void *buf,int len);
|
williamr@2
|
379 |
int (*ssl_write)(SSL *s,const void *buf,int len);
|
williamr@2
|
380 |
int (*ssl_shutdown)(SSL *s);
|
williamr@2
|
381 |
int (*ssl_renegotiate)(SSL *s);
|
williamr@2
|
382 |
int (*ssl_renegotiate_check)(SSL *s);
|
williamr@2
|
383 |
long (*ssl_get_message)(SSL *s, int st1, int stn, int mt, long
|
williamr@2
|
384 |
max, int *ok);
|
williamr@2
|
385 |
int (*ssl_read_bytes)(SSL *s, int type, unsigned char *buf, int len,
|
williamr@2
|
386 |
int peek);
|
williamr@2
|
387 |
int (*ssl_write_bytes)(SSL *s, int type, const void *buf_, int len);
|
williamr@2
|
388 |
int (*ssl_dispatch_alert)(SSL *s);
|
williamr@2
|
389 |
long (*ssl_ctrl)(SSL *s,int cmd,long larg,void *parg);
|
williamr@2
|
390 |
long (*ssl_ctx_ctrl)(SSL_CTX *ctx,int cmd,long larg,void *parg);
|
williamr@2
|
391 |
SSL_CIPHER *(*get_cipher_by_char)(const unsigned char *ptr);
|
williamr@2
|
392 |
int (*put_cipher_by_char)(const SSL_CIPHER *cipher,unsigned char *ptr);
|
williamr@2
|
393 |
int (*ssl_pending)(const SSL *s);
|
williamr@2
|
394 |
int (*num_ciphers)(void);
|
williamr@2
|
395 |
SSL_CIPHER *(*get_cipher)(unsigned ncipher);
|
williamr@2
|
396 |
struct ssl_method_st *(*get_ssl_method)(int version);
|
williamr@2
|
397 |
long (*get_timeout)(void);
|
williamr@2
|
398 |
struct ssl3_enc_method *ssl3_enc; /* Extra SSLv3/TLS stuff */
|
williamr@2
|
399 |
int (*ssl_version)(void);
|
williamr@2
|
400 |
long (*ssl_callback_ctrl)(SSL *s, int cb_id, void (*fp)(void));
|
williamr@2
|
401 |
long (*ssl_ctx_callback_ctrl)(SSL_CTX *s, int cb_id, void (*fp)(void));
|
williamr@2
|
402 |
} SSL_METHOD;
|
williamr@2
|
403 |
|
williamr@2
|
404 |
/* Lets make this into an ASN.1 type structure as follows
|
williamr@2
|
405 |
* SSL_SESSION_ID ::= SEQUENCE {
|
williamr@2
|
406 |
* version INTEGER, -- structure version number
|
williamr@2
|
407 |
* SSLversion INTEGER, -- SSL version number
|
williamr@2
|
408 |
* Cipher OCTET_STRING, -- the 3 byte cipher ID
|
williamr@2
|
409 |
* Session_ID OCTET_STRING, -- the Session ID
|
williamr@2
|
410 |
* Master_key OCTET_STRING, -- the master key
|
williamr@2
|
411 |
* KRB5_principal OCTET_STRING -- optional Kerberos principal
|
williamr@2
|
412 |
* Key_Arg [ 0 ] IMPLICIT OCTET_STRING, -- the optional Key argument
|
williamr@2
|
413 |
* Time [ 1 ] EXPLICIT INTEGER, -- optional Start Time
|
williamr@2
|
414 |
* Timeout [ 2 ] EXPLICIT INTEGER, -- optional Timeout ins seconds
|
williamr@2
|
415 |
* Peer [ 3 ] EXPLICIT X509, -- optional Peer Certificate
|
williamr@2
|
416 |
* Session_ID_context [ 4 ] EXPLICIT OCTET_STRING, -- the Session ID context
|
williamr@2
|
417 |
* Verify_result [ 5 ] EXPLICIT INTEGER -- X509_V_... code for `Peer'
|
williamr@2
|
418 |
* Compression [6] IMPLICIT ASN1_OBJECT -- compression OID XXXXX
|
williamr@2
|
419 |
* }
|
williamr@2
|
420 |
* Look in ssl/ssl_asn1.c for more details
|
williamr@2
|
421 |
* I'm using EXPLICIT tags so I can read the damn things using asn1parse :-).
|
williamr@2
|
422 |
*/
|
williamr@2
|
423 |
typedef struct ssl_session_st
|
williamr@2
|
424 |
{
|
williamr@2
|
425 |
int ssl_version; /* what ssl version session info is
|
williamr@2
|
426 |
* being kept in here? */
|
williamr@2
|
427 |
|
williamr@2
|
428 |
/* only really used in SSLv2 */
|
williamr@2
|
429 |
unsigned int key_arg_length;
|
williamr@2
|
430 |
unsigned char key_arg[SSL_MAX_KEY_ARG_LENGTH];
|
williamr@2
|
431 |
int master_key_length;
|
williamr@2
|
432 |
unsigned char master_key[SSL_MAX_MASTER_KEY_LENGTH];
|
williamr@2
|
433 |
/* session_id - valid? */
|
williamr@2
|
434 |
unsigned int session_id_length;
|
williamr@2
|
435 |
unsigned char session_id[SSL_MAX_SSL_SESSION_ID_LENGTH];
|
williamr@2
|
436 |
/* this is used to determine whether the session is being reused in
|
williamr@2
|
437 |
* the appropriate context. It is up to the application to set this,
|
williamr@2
|
438 |
* via SSL_new */
|
williamr@2
|
439 |
unsigned int sid_ctx_length;
|
williamr@2
|
440 |
unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
|
williamr@2
|
441 |
|
williamr@2
|
442 |
#ifndef OPENSSL_NO_KRB5
|
williamr@2
|
443 |
unsigned int krb5_client_princ_len;
|
williamr@2
|
444 |
unsigned char krb5_client_princ[SSL_MAX_KRB5_PRINCIPAL_LENGTH];
|
williamr@2
|
445 |
#endif /* OPENSSL_NO_KRB5 */
|
williamr@2
|
446 |
|
williamr@2
|
447 |
int not_resumable;
|
williamr@2
|
448 |
|
williamr@2
|
449 |
/* The cert is the certificate used to establish this connection */
|
williamr@2
|
450 |
struct sess_cert_st /* SESS_CERT */ *sess_cert;
|
williamr@2
|
451 |
|
williamr@2
|
452 |
/* This is the cert for the other end.
|
williamr@2
|
453 |
* On clients, it will be the same as sess_cert->peer_key->x509
|
williamr@2
|
454 |
* (the latter is not enough as sess_cert is not retained
|
williamr@2
|
455 |
* in the external representation of sessions, see ssl_asn1.c). */
|
williamr@2
|
456 |
X509 *peer;
|
williamr@2
|
457 |
/* when app_verify_callback accepts a session where the peer's certificate
|
williamr@2
|
458 |
* is not ok, we must remember the error for session reuse: */
|
williamr@2
|
459 |
long verify_result; /* only for servers */
|
williamr@2
|
460 |
|
williamr@2
|
461 |
int references;
|
williamr@2
|
462 |
long timeout;
|
williamr@2
|
463 |
long time;
|
williamr@2
|
464 |
|
williamr@2
|
465 |
int compress_meth; /* Need to lookup the method */
|
williamr@2
|
466 |
|
williamr@2
|
467 |
SSL_CIPHER *cipher;
|
williamr@2
|
468 |
unsigned long cipher_id; /* when ASN.1 loaded, this
|
williamr@2
|
469 |
* needs to be used to load
|
williamr@2
|
470 |
* the 'cipher' structure */
|
williamr@2
|
471 |
|
williamr@2
|
472 |
STACK_OF(SSL_CIPHER) *ciphers; /* shared ciphers? */
|
williamr@2
|
473 |
|
williamr@2
|
474 |
CRYPTO_EX_DATA ex_data; /* application specific data */
|
williamr@2
|
475 |
|
williamr@2
|
476 |
/* These are used to make removal of session-ids more
|
williamr@2
|
477 |
* efficient and to implement a maximum cache size. */
|
williamr@2
|
478 |
struct ssl_session_st *prev,*next;
|
williamr@2
|
479 |
|
williamr@2
|
480 |
} SSL_SESSION;
|
williamr@2
|
481 |
|
williamr@2
|
482 |
|
williamr@2
|
483 |
#define SSL_OP_MICROSOFT_SESS_ID_BUG 0x00000001L
|
williamr@2
|
484 |
#define SSL_OP_NETSCAPE_CHALLENGE_BUG 0x00000002L
|
williamr@2
|
485 |
#define SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG 0x00000008L
|
williamr@2
|
486 |
#define SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG 0x00000010L
|
williamr@2
|
487 |
#define SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER 0x00000020L
|
williamr@2
|
488 |
#define SSL_OP_MSIE_SSLV2_RSA_PADDING 0x00000040L /* no effect since 0.9.7h and 0.9.8b */
|
williamr@2
|
489 |
#define SSL_OP_SSLEAY_080_CLIENT_DH_BUG 0x00000080L
|
williamr@2
|
490 |
#define SSL_OP_TLS_D5_BUG 0x00000100L
|
williamr@2
|
491 |
#define SSL_OP_TLS_BLOCK_PADDING_BUG 0x00000200L
|
williamr@2
|
492 |
|
williamr@2
|
493 |
/* Disable SSL 3.0/TLS 1.0 CBC vulnerability workaround that was added
|
williamr@2
|
494 |
* in OpenSSL 0.9.6d. Usually (depending on the application protocol)
|
williamr@2
|
495 |
* the workaround is not needed. Unfortunately some broken SSL/TLS
|
williamr@2
|
496 |
* implementations cannot handle it at all, which is why we include
|
williamr@2
|
497 |
* it in SSL_OP_ALL. */
|
williamr@2
|
498 |
#define SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS 0x00000800L /* added in 0.9.6e */
|
williamr@2
|
499 |
|
williamr@2
|
500 |
/* SSL_OP_ALL: various bug workarounds that should be rather harmless.
|
williamr@2
|
501 |
* This used to be 0x000FFFFFL before 0.9.7. */
|
williamr@2
|
502 |
#define SSL_OP_ALL 0x00000FFFL
|
williamr@2
|
503 |
|
williamr@2
|
504 |
/* DTLS options */
|
williamr@2
|
505 |
#define SSL_OP_NO_QUERY_MTU 0x00001000L
|
williamr@2
|
506 |
/* Turn on Cookie Exchange (on relevant for servers) */
|
williamr@2
|
507 |
#define SSL_OP_COOKIE_EXCHANGE 0x00002000L
|
williamr@2
|
508 |
/* Don't use RFC4507 ticket extension */
|
williamr@2
|
509 |
#define SSL_OP_NO_TICKET 0x00004000L
|
williamr@2
|
510 |
|
williamr@2
|
511 |
/* As server, disallow session resumption on renegotiation */
|
williamr@2
|
512 |
#define SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION 0x00010000L
|
williamr@2
|
513 |
/* If set, always create a new key when using tmp_ecdh parameters */
|
williamr@2
|
514 |
#define SSL_OP_SINGLE_ECDH_USE 0x00080000L
|
williamr@2
|
515 |
/* If set, always create a new key when using tmp_dh parameters */
|
williamr@2
|
516 |
#define SSL_OP_SINGLE_DH_USE 0x00100000L
|
williamr@2
|
517 |
/* Set to always use the tmp_rsa key when doing RSA operations,
|
williamr@2
|
518 |
* even when this violates protocol specs */
|
williamr@2
|
519 |
#define SSL_OP_EPHEMERAL_RSA 0x00200000L
|
williamr@2
|
520 |
/* Set on servers to choose the cipher according to the server's
|
williamr@2
|
521 |
* preferences */
|
williamr@2
|
522 |
#define SSL_OP_CIPHER_SERVER_PREFERENCE 0x00400000L
|
williamr@2
|
523 |
/* If set, a server will allow a client to issue a SSLv3.0 version number
|
williamr@2
|
524 |
* as latest version supported in the premaster secret, even when TLSv1.0
|
williamr@2
|
525 |
* (version 3.1) was announced in the client hello. Normally this is
|
williamr@2
|
526 |
* forbidden to prevent version rollback attacks. */
|
williamr@2
|
527 |
#define SSL_OP_TLS_ROLLBACK_BUG 0x00800000L
|
williamr@2
|
528 |
|
williamr@2
|
529 |
#define SSL_OP_NO_SSLv2 0x01000000L
|
williamr@2
|
530 |
#define SSL_OP_NO_SSLv3 0x02000000L
|
williamr@2
|
531 |
#define SSL_OP_NO_TLSv1 0x04000000L
|
williamr@2
|
532 |
|
williamr@2
|
533 |
/* The next flag deliberately changes the ciphertest, this is a check
|
williamr@2
|
534 |
* for the PKCS#1 attack */
|
williamr@2
|
535 |
#define SSL_OP_PKCS1_CHECK_1 0x08000000L
|
williamr@2
|
536 |
#define SSL_OP_PKCS1_CHECK_2 0x10000000L
|
williamr@2
|
537 |
#define SSL_OP_NETSCAPE_CA_DN_BUG 0x20000000L
|
williamr@2
|
538 |
#define SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG 0x40000000L
|
williamr@2
|
539 |
|
williamr@2
|
540 |
|
williamr@2
|
541 |
/* Allow SSL_write(..., n) to return r with 0 < r < n (i.e. report success
|
williamr@2
|
542 |
* when just a single record has been written): */
|
williamr@2
|
543 |
#define SSL_MODE_ENABLE_PARTIAL_WRITE 0x00000001L
|
williamr@2
|
544 |
/* Make it possible to retry SSL_write() with changed buffer location
|
williamr@2
|
545 |
* (buffer contents must stay the same!); this is not the default to avoid
|
williamr@2
|
546 |
* the misconception that non-blocking SSL_write() behaves like
|
williamr@2
|
547 |
* non-blocking write(): */
|
williamr@2
|
548 |
#define SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER 0x00000002L
|
williamr@2
|
549 |
/* Never bother the application with retries if the transport
|
williamr@2
|
550 |
* is blocking: */
|
williamr@2
|
551 |
#define SSL_MODE_AUTO_RETRY 0x00000004L
|
williamr@2
|
552 |
/* Don't attempt to automatically build certificate chain */
|
williamr@2
|
553 |
#define SSL_MODE_NO_AUTO_CHAIN 0x00000008L
|
williamr@2
|
554 |
|
williamr@2
|
555 |
|
williamr@2
|
556 |
/* Note: SSL[_CTX]_set_{options,mode} use |= op on the previous value,
|
williamr@2
|
557 |
* they cannot be used to clear bits. */
|
williamr@2
|
558 |
|
williamr@2
|
559 |
#define SSL_CTX_set_options(ctx,op) \
|
williamr@2
|
560 |
SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
|
williamr@2
|
561 |
#define SSL_CTX_get_options(ctx) \
|
williamr@2
|
562 |
SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,0,NULL)
|
williamr@2
|
563 |
#define SSL_set_options(ssl,op) \
|
williamr@2
|
564 |
SSL_ctrl((ssl),SSL_CTRL_OPTIONS,(op),NULL)
|
williamr@2
|
565 |
#define SSL_get_options(ssl) \
|
williamr@2
|
566 |
SSL_ctrl((ssl),SSL_CTRL_OPTIONS,0,NULL)
|
williamr@2
|
567 |
|
williamr@2
|
568 |
#define SSL_CTX_set_mode(ctx,op) \
|
williamr@2
|
569 |
SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
|
williamr@2
|
570 |
#define SSL_CTX_get_mode(ctx) \
|
williamr@2
|
571 |
SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,0,NULL)
|
williamr@2
|
572 |
#define SSL_set_mode(ssl,op) \
|
williamr@2
|
573 |
SSL_ctrl((ssl),SSL_CTRL_MODE,(op),NULL)
|
williamr@2
|
574 |
#define SSL_get_mode(ssl) \
|
williamr@2
|
575 |
SSL_ctrl((ssl),SSL_CTRL_MODE,0,NULL)
|
williamr@2
|
576 |
#define SSL_set_mtu(ssl, mtu) \
|
williamr@2
|
577 |
SSL_ctrl((ssl),SSL_CTRL_SET_MTU,(mtu),NULL)
|
williamr@2
|
578 |
|
williamr@2
|
579 |
|
williamr@2
|
580 |
IMPORT_C 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));
|
williamr@2
|
581 |
IMPORT_C void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg));
|
williamr@2
|
582 |
#define SSL_CTX_set_msg_callback_arg(ctx, arg) SSL_CTX_ctrl((ctx), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
|
williamr@2
|
583 |
#define SSL_set_msg_callback_arg(ssl, arg) SSL_ctrl((ssl), SSL_CTRL_SET_MSG_CALLBACK_ARG, 0, (arg))
|
williamr@2
|
584 |
|
williamr@2
|
585 |
|
williamr@2
|
586 |
|
williamr@2
|
587 |
#if defined(OPENSSL_SYS_MSDOS) && !defined(OPENSSL_SYS_WIN32)
|
williamr@2
|
588 |
#define SSL_MAX_CERT_LIST_DEFAULT 1024*30 /* 30k max cert list :-) */
|
williamr@2
|
589 |
#else
|
williamr@2
|
590 |
#define SSL_MAX_CERT_LIST_DEFAULT 1024*100 /* 100k max cert list :-) */
|
williamr@2
|
591 |
#endif
|
williamr@2
|
592 |
|
williamr@2
|
593 |
#define SSL_SESSION_CACHE_MAX_SIZE_DEFAULT (1024*20)
|
williamr@2
|
594 |
|
williamr@2
|
595 |
/* This callback type is used inside SSL_CTX, SSL, and in the functions that set
|
williamr@2
|
596 |
* them. It is used to override the generation of SSL/TLS session IDs in a
|
williamr@2
|
597 |
* server. Return value should be zero on an error, non-zero to proceed. Also,
|
williamr@2
|
598 |
* callbacks should themselves check if the id they generate is unique otherwise
|
williamr@2
|
599 |
* the SSL handshake will fail with an error - callbacks can do this using the
|
williamr@2
|
600 |
* 'ssl' value they're passed by;
|
williamr@2
|
601 |
* SSL_has_matching_session_id(ssl, id, *id_len)
|
williamr@2
|
602 |
* The length value passed in is set at the maximum size the session ID can be.
|
williamr@2
|
603 |
* In SSLv2 this is 16 bytes, whereas SSLv3/TLSv1 it is 32 bytes. The callback
|
williamr@2
|
604 |
* can alter this length to be less if desired, but under SSLv2 session IDs are
|
williamr@2
|
605 |
* supposed to be fixed at 16 bytes so the id will be padded after the callback
|
williamr@2
|
606 |
* returns in this case. It is also an error for the callback to set the size to
|
williamr@2
|
607 |
* zero. */
|
williamr@2
|
608 |
typedef int (*GEN_SESSION_CB)(const SSL *ssl, unsigned char *id,
|
williamr@2
|
609 |
unsigned int *id_len);
|
williamr@2
|
610 |
|
williamr@2
|
611 |
typedef struct ssl_comp_st
|
williamr@2
|
612 |
{
|
williamr@2
|
613 |
int id;
|
williamr@2
|
614 |
const char *name;
|
williamr@2
|
615 |
#ifndef OPENSSL_NO_COMP
|
williamr@2
|
616 |
COMP_METHOD *method;
|
williamr@2
|
617 |
#else
|
williamr@2
|
618 |
char *method;
|
williamr@2
|
619 |
#endif
|
williamr@2
|
620 |
} SSL_COMP;
|
williamr@2
|
621 |
|
williamr@2
|
622 |
DECLARE_STACK_OF(SSL_COMP)
|
williamr@2
|
623 |
|
williamr@2
|
624 |
struct ssl_ctx_st
|
williamr@2
|
625 |
{
|
williamr@2
|
626 |
SSL_METHOD *method;
|
williamr@2
|
627 |
|
williamr@2
|
628 |
STACK_OF(SSL_CIPHER) *cipher_list;
|
williamr@2
|
629 |
/* same as above but sorted for lookup */
|
williamr@2
|
630 |
STACK_OF(SSL_CIPHER) *cipher_list_by_id;
|
williamr@2
|
631 |
|
williamr@2
|
632 |
struct x509_store_st /* X509_STORE */ *cert_store;
|
williamr@2
|
633 |
struct lhash_st /* LHASH */ *sessions; /* a set of SSL_SESSIONs */
|
williamr@2
|
634 |
/* Most session-ids that will be cached, default is
|
williamr@2
|
635 |
* SSL_SESSION_CACHE_MAX_SIZE_DEFAULT. 0 is unlimited. */
|
williamr@2
|
636 |
unsigned long session_cache_size;
|
williamr@2
|
637 |
struct ssl_session_st *session_cache_head;
|
williamr@2
|
638 |
struct ssl_session_st *session_cache_tail;
|
williamr@2
|
639 |
|
williamr@2
|
640 |
/* This can have one of 2 values, ored together,
|
williamr@2
|
641 |
* SSL_SESS_CACHE_CLIENT,
|
williamr@2
|
642 |
* SSL_SESS_CACHE_SERVER,
|
williamr@2
|
643 |
* Default is SSL_SESSION_CACHE_SERVER, which means only
|
williamr@2
|
644 |
* SSL_accept which cache SSL_SESSIONS. */
|
williamr@2
|
645 |
int session_cache_mode;
|
williamr@2
|
646 |
|
williamr@2
|
647 |
/* If timeout is not 0, it is the default timeout value set
|
williamr@2
|
648 |
* when SSL_new() is called. This has been put in to make
|
williamr@2
|
649 |
* life easier to set things up */
|
williamr@2
|
650 |
long session_timeout;
|
williamr@2
|
651 |
|
williamr@2
|
652 |
/* If this callback is not null, it will be called each
|
williamr@2
|
653 |
* time a session id is added to the cache. If this function
|
williamr@2
|
654 |
* returns 1, it means that the callback will do a
|
williamr@2
|
655 |
* SSL_SESSION_free() when it has finished using it. Otherwise,
|
williamr@2
|
656 |
* on 0, it means the callback has finished with it.
|
williamr@2
|
657 |
* If remove_session_cb is not null, it will be called when
|
williamr@2
|
658 |
* a session-id is removed from the cache. After the call,
|
williamr@2
|
659 |
* OpenSSL will SSL_SESSION_free() it. */
|
williamr@2
|
660 |
int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess);
|
williamr@2
|
661 |
void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess);
|
williamr@2
|
662 |
SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl,
|
williamr@2
|
663 |
unsigned char *data,int len,int *copy);
|
williamr@2
|
664 |
|
williamr@2
|
665 |
struct
|
williamr@2
|
666 |
{
|
williamr@2
|
667 |
int sess_connect; /* SSL new conn - started */
|
williamr@2
|
668 |
int sess_connect_renegotiate;/* SSL reneg - requested */
|
williamr@2
|
669 |
int sess_connect_good; /* SSL new conne/reneg - finished */
|
williamr@2
|
670 |
int sess_accept; /* SSL new accept - started */
|
williamr@2
|
671 |
int sess_accept_renegotiate;/* SSL reneg - requested */
|
williamr@2
|
672 |
int sess_accept_good; /* SSL accept/reneg - finished */
|
williamr@2
|
673 |
int sess_miss; /* session lookup misses */
|
williamr@2
|
674 |
int sess_timeout; /* reuse attempt on timeouted session */
|
williamr@2
|
675 |
int sess_cache_full; /* session removed due to full cache */
|
williamr@2
|
676 |
int sess_hit; /* session reuse actually done */
|
williamr@2
|
677 |
int sess_cb_hit; /* session-id that was not
|
williamr@2
|
678 |
* in the cache was
|
williamr@2
|
679 |
* passed back via the callback. This
|
williamr@2
|
680 |
* indicates that the application is
|
williamr@2
|
681 |
* supplying session-id's from other
|
williamr@2
|
682 |
* processes - spooky :-) */
|
williamr@2
|
683 |
} stats;
|
williamr@2
|
684 |
|
williamr@2
|
685 |
int references;
|
williamr@2
|
686 |
|
williamr@2
|
687 |
/* if defined, these override the X509_verify_cert() calls */
|
williamr@2
|
688 |
int (*app_verify_callback)(X509_STORE_CTX *, void *);
|
williamr@2
|
689 |
void *app_verify_arg;
|
williamr@2
|
690 |
/* before OpenSSL 0.9.7, 'app_verify_arg' was ignored
|
williamr@2
|
691 |
* ('app_verify_callback' was called with just one argument) */
|
williamr@2
|
692 |
|
williamr@2
|
693 |
/* Default password callback. */
|
williamr@2
|
694 |
pem_password_cb *default_passwd_callback;
|
williamr@2
|
695 |
|
williamr@2
|
696 |
/* Default password callback user data. */
|
williamr@2
|
697 |
void *default_passwd_callback_userdata;
|
williamr@2
|
698 |
|
williamr@2
|
699 |
/* get client cert callback */
|
williamr@2
|
700 |
int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
|
williamr@2
|
701 |
|
williamr@2
|
702 |
/* cookie generate callback */
|
williamr@2
|
703 |
int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie,
|
williamr@2
|
704 |
unsigned int *cookie_len);
|
williamr@2
|
705 |
|
williamr@2
|
706 |
/* verify cookie callback */
|
williamr@2
|
707 |
int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie,
|
williamr@2
|
708 |
unsigned int cookie_len);
|
williamr@2
|
709 |
|
williamr@2
|
710 |
CRYPTO_EX_DATA ex_data;
|
williamr@2
|
711 |
|
williamr@2
|
712 |
const EVP_MD *rsa_md5;/* For SSLv2 - name is 'ssl2-md5' */
|
williamr@2
|
713 |
const EVP_MD *md5; /* For SSLv3/TLSv1 'ssl3-md5' */
|
williamr@2
|
714 |
const EVP_MD *sha1; /* For SSLv3/TLSv1 'ssl3->sha1' */
|
williamr@2
|
715 |
|
williamr@2
|
716 |
STACK_OF(X509) *extra_certs;
|
williamr@2
|
717 |
STACK_OF(SSL_COMP) *comp_methods; /* stack of SSL_COMP, SSLv3/TLSv1 */
|
williamr@2
|
718 |
|
williamr@2
|
719 |
|
williamr@2
|
720 |
/* Default values used when no per-SSL value is defined follow */
|
williamr@2
|
721 |
|
williamr@2
|
722 |
void (*info_callback)(const SSL *ssl,int type,int val); /* used if SSL's info_callback is NULL */
|
williamr@2
|
723 |
|
williamr@2
|
724 |
/* what we put in client cert requests */
|
williamr@2
|
725 |
STACK_OF(X509_NAME) *client_CA;
|
williamr@2
|
726 |
|
williamr@2
|
727 |
|
williamr@2
|
728 |
/* Default values to use in SSL structures follow (these are copied by SSL_new) */
|
williamr@2
|
729 |
|
williamr@2
|
730 |
unsigned long options;
|
williamr@2
|
731 |
unsigned long mode;
|
williamr@2
|
732 |
long max_cert_list;
|
williamr@2
|
733 |
|
williamr@2
|
734 |
struct cert_st /* CERT */ *cert;
|
williamr@2
|
735 |
int read_ahead;
|
williamr@2
|
736 |
|
williamr@2
|
737 |
/* callback that allows applications to peek at protocol messages */
|
williamr@2
|
738 |
void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
|
williamr@2
|
739 |
void *msg_callback_arg;
|
williamr@2
|
740 |
|
williamr@2
|
741 |
int verify_mode;
|
williamr@2
|
742 |
unsigned int sid_ctx_length;
|
williamr@2
|
743 |
unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
|
williamr@2
|
744 |
int (*default_verify_callback)(int ok,X509_STORE_CTX *ctx); /* called 'verify_callback' in the SSL */
|
williamr@2
|
745 |
|
williamr@2
|
746 |
/* Default generate session ID callback. */
|
williamr@2
|
747 |
GEN_SESSION_CB generate_session_id;
|
williamr@2
|
748 |
|
williamr@2
|
749 |
X509_VERIFY_PARAM *param;
|
williamr@2
|
750 |
|
williamr@2
|
751 |
#if 0
|
williamr@2
|
752 |
int purpose; /* Purpose setting */
|
williamr@2
|
753 |
int trust; /* Trust setting */
|
williamr@2
|
754 |
#endif
|
williamr@2
|
755 |
|
williamr@2
|
756 |
int quiet_shutdown;
|
williamr@2
|
757 |
|
williamr@2
|
758 |
|
williamr@2
|
759 |
|
williamr@2
|
760 |
};
|
williamr@2
|
761 |
|
williamr@2
|
762 |
#define SSL_SESS_CACHE_OFF 0x0000
|
williamr@2
|
763 |
#define SSL_SESS_CACHE_CLIENT 0x0001
|
williamr@2
|
764 |
#define SSL_SESS_CACHE_SERVER 0x0002
|
williamr@2
|
765 |
#define SSL_SESS_CACHE_BOTH (SSL_SESS_CACHE_CLIENT|SSL_SESS_CACHE_SERVER)
|
williamr@2
|
766 |
#define SSL_SESS_CACHE_NO_AUTO_CLEAR 0x0080
|
williamr@2
|
767 |
/* enough comments already ... see SSL_CTX_set_session_cache_mode(3) */
|
williamr@2
|
768 |
#define SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100
|
williamr@2
|
769 |
#define SSL_SESS_CACHE_NO_INTERNAL_STORE 0x0200
|
williamr@2
|
770 |
#define SSL_SESS_CACHE_NO_INTERNAL \
|
williamr@2
|
771 |
(SSL_SESS_CACHE_NO_INTERNAL_LOOKUP|SSL_SESS_CACHE_NO_INTERNAL_STORE)
|
williamr@2
|
772 |
|
williamr@2
|
773 |
IMPORT_C struct lhash_st *SSL_CTX_sessions(SSL_CTX *ctx);
|
williamr@2
|
774 |
#define SSL_CTX_sess_number(ctx) \
|
williamr@2
|
775 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_NUMBER,0,NULL)
|
williamr@2
|
776 |
#define SSL_CTX_sess_connect(ctx) \
|
williamr@2
|
777 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT,0,NULL)
|
williamr@2
|
778 |
#define SSL_CTX_sess_connect_good(ctx) \
|
williamr@2
|
779 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_GOOD,0,NULL)
|
williamr@2
|
780 |
#define SSL_CTX_sess_connect_renegotiate(ctx) \
|
williamr@2
|
781 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CONNECT_RENEGOTIATE,0,NULL)
|
williamr@2
|
782 |
#define SSL_CTX_sess_accept(ctx) \
|
williamr@2
|
783 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT,0,NULL)
|
williamr@2
|
784 |
#define SSL_CTX_sess_accept_renegotiate(ctx) \
|
williamr@2
|
785 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_RENEGOTIATE,0,NULL)
|
williamr@2
|
786 |
#define SSL_CTX_sess_accept_good(ctx) \
|
williamr@2
|
787 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_ACCEPT_GOOD,0,NULL)
|
williamr@2
|
788 |
#define SSL_CTX_sess_hits(ctx) \
|
williamr@2
|
789 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_HIT,0,NULL)
|
williamr@2
|
790 |
#define SSL_CTX_sess_cb_hits(ctx) \
|
williamr@2
|
791 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CB_HIT,0,NULL)
|
williamr@2
|
792 |
#define SSL_CTX_sess_misses(ctx) \
|
williamr@2
|
793 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_MISSES,0,NULL)
|
williamr@2
|
794 |
#define SSL_CTX_sess_timeouts(ctx) \
|
williamr@2
|
795 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_TIMEOUTS,0,NULL)
|
williamr@2
|
796 |
#define SSL_CTX_sess_cache_full(ctx) \
|
williamr@2
|
797 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SESS_CACHE_FULL,0,NULL)
|
williamr@2
|
798 |
|
williamr@2
|
799 |
void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, int (*new_session_cb)(struct ssl_st *ssl,SSL_SESSION *sess));
|
williamr@2
|
800 |
int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(struct ssl_st *ssl, SSL_SESSION *sess);
|
williamr@2
|
801 |
void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, void (*remove_session_cb)(struct ssl_ctx_st *ctx,SSL_SESSION *sess));
|
williamr@2
|
802 |
void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(struct ssl_ctx_st *ctx, SSL_SESSION *sess);
|
williamr@2
|
803 |
void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*get_session_cb)(struct ssl_st *ssl, unsigned char *data,int len,int *copy));
|
williamr@2
|
804 |
SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(struct ssl_st *ssl, unsigned char *Data, int len, int *copy);
|
williamr@2
|
805 |
void SSL_CTX_set_info_callback(SSL_CTX *ctx, void (*cb)(const SSL *ssl,int type,int val));
|
williamr@2
|
806 |
void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val);
|
williamr@2
|
807 |
void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, int (*client_cert_cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
|
williamr@2
|
808 |
int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL *ssl, X509 **x509, EVP_PKEY **pkey);
|
williamr@2
|
809 |
void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, int (*app_gen_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len));
|
williamr@2
|
810 |
void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, int (*app_verify_cookie_cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len));
|
williamr@2
|
811 |
|
williamr@2
|
812 |
#define SSL_NOTHING 1
|
williamr@2
|
813 |
#define SSL_WRITING 2
|
williamr@2
|
814 |
#define SSL_READING 3
|
williamr@2
|
815 |
#define SSL_X509_LOOKUP 4
|
williamr@2
|
816 |
|
williamr@2
|
817 |
/* These will only be used when doing non-blocking IO */
|
williamr@2
|
818 |
#define SSL_want_nothing(s) (SSL_want(s) == SSL_NOTHING)
|
williamr@2
|
819 |
#define SSL_want_read(s) (SSL_want(s) == SSL_READING)
|
williamr@2
|
820 |
#define SSL_want_write(s) (SSL_want(s) == SSL_WRITING)
|
williamr@2
|
821 |
#define SSL_want_x509_lookup(s) (SSL_want(s) == SSL_X509_LOOKUP)
|
williamr@2
|
822 |
|
williamr@2
|
823 |
struct ssl_st
|
williamr@2
|
824 |
{
|
williamr@2
|
825 |
/* protocol version
|
williamr@2
|
826 |
* (one of SSL2_VERSION, SSL3_VERSION, TLS1_VERSION, DTLS1_VERSION)
|
williamr@2
|
827 |
*/
|
williamr@2
|
828 |
int version;
|
williamr@2
|
829 |
int type; /* SSL_ST_CONNECT or SSL_ST_ACCEPT */
|
williamr@2
|
830 |
|
williamr@2
|
831 |
SSL_METHOD *method; /* SSLv3 */
|
williamr@2
|
832 |
|
williamr@2
|
833 |
/* There are 2 BIO's even though they are normally both the
|
williamr@2
|
834 |
* same. This is so data can be read and written to different
|
williamr@2
|
835 |
* handlers */
|
williamr@2
|
836 |
|
williamr@2
|
837 |
#ifndef OPENSSL_NO_BIO
|
williamr@2
|
838 |
BIO *rbio; /* used by SSL_read */
|
williamr@2
|
839 |
BIO *wbio; /* used by SSL_write */
|
williamr@2
|
840 |
BIO *bbio; /* used during session-id reuse to concatenate
|
williamr@2
|
841 |
* messages */
|
williamr@2
|
842 |
#else
|
williamr@2
|
843 |
char *rbio; /* used by SSL_read */
|
williamr@2
|
844 |
char *wbio; /* used by SSL_write */
|
williamr@2
|
845 |
char *bbio;
|
williamr@2
|
846 |
#endif
|
williamr@2
|
847 |
/* This holds a variable that indicates what we were doing
|
williamr@2
|
848 |
* when a 0 or -1 is returned. This is needed for
|
williamr@2
|
849 |
* non-blocking IO so we know what request needs re-doing when
|
williamr@2
|
850 |
* in SSL_accept or SSL_connect */
|
williamr@2
|
851 |
int rwstate;
|
williamr@2
|
852 |
|
williamr@2
|
853 |
/* true when we are actually in SSL_accept() or SSL_connect() */
|
williamr@2
|
854 |
int in_handshake;
|
williamr@2
|
855 |
int (*handshake_func)(SSL *);
|
williamr@2
|
856 |
|
williamr@2
|
857 |
/* Imagine that here's a boolean member "init" that is
|
williamr@2
|
858 |
* switched as soon as SSL_set_{accept/connect}_state
|
williamr@2
|
859 |
* is called for the first time, so that "state" and
|
williamr@2
|
860 |
* "handshake_func" are properly initialized. But as
|
williamr@2
|
861 |
* handshake_func is == 0 until then, we use this
|
williamr@2
|
862 |
* test instead of an "init" member.
|
williamr@2
|
863 |
*/
|
williamr@2
|
864 |
|
williamr@2
|
865 |
int server; /* are we the server side? - mostly used by SSL_clear*/
|
williamr@2
|
866 |
|
williamr@2
|
867 |
int new_session;/* 1 if we are to use a new session.
|
williamr@2
|
868 |
* 2 if we are a server and are inside a handshake
|
williamr@2
|
869 |
* (i.e. not just sending a HelloRequest)
|
williamr@2
|
870 |
* NB: For servers, the 'new' session may actually be a previously
|
williamr@2
|
871 |
* cached session or even the previous session unless
|
williamr@2
|
872 |
* SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION is set */
|
williamr@2
|
873 |
int quiet_shutdown;/* don't send shutdown packets */
|
williamr@2
|
874 |
int shutdown; /* we have shut things down, 0x01 sent, 0x02
|
williamr@2
|
875 |
* for received */
|
williamr@2
|
876 |
int state; /* where we are */
|
williamr@2
|
877 |
int rstate; /* where we are when reading */
|
williamr@2
|
878 |
|
williamr@2
|
879 |
BUF_MEM *init_buf; /* buffer used during init */
|
williamr@2
|
880 |
void *init_msg; /* pointer to handshake message body, set by ssl3_get_message() */
|
williamr@2
|
881 |
int init_num; /* amount read/written */
|
williamr@2
|
882 |
int init_off; /* amount read/written */
|
williamr@2
|
883 |
|
williamr@2
|
884 |
/* used internally to point at a raw packet */
|
williamr@2
|
885 |
unsigned char *packet;
|
williamr@2
|
886 |
unsigned int packet_length;
|
williamr@2
|
887 |
|
williamr@2
|
888 |
struct ssl2_state_st *s2; /* SSLv2 variables */
|
williamr@2
|
889 |
struct ssl3_state_st *s3; /* SSLv3 variables */
|
williamr@2
|
890 |
struct dtls1_state_st *d1; /* DTLSv1 variables */
|
williamr@2
|
891 |
|
williamr@2
|
892 |
int read_ahead; /* Read as many input bytes as possible
|
williamr@2
|
893 |
* (for non-blocking reads) */
|
williamr@2
|
894 |
|
williamr@2
|
895 |
/* callback that allows applications to peek at protocol messages */
|
williamr@2
|
896 |
void (*msg_callback)(int write_p, int version, int content_type, const void *buf, size_t len, SSL *ssl, void *arg);
|
williamr@2
|
897 |
void *msg_callback_arg;
|
williamr@2
|
898 |
|
williamr@2
|
899 |
int hit; /* reusing a previous session */
|
williamr@2
|
900 |
|
williamr@2
|
901 |
X509_VERIFY_PARAM *param;
|
williamr@2
|
902 |
|
williamr@2
|
903 |
#if 0
|
williamr@2
|
904 |
int purpose; /* Purpose setting */
|
williamr@2
|
905 |
int trust; /* Trust setting */
|
williamr@2
|
906 |
#endif
|
williamr@2
|
907 |
|
williamr@2
|
908 |
/* crypto */
|
williamr@2
|
909 |
STACK_OF(SSL_CIPHER) *cipher_list;
|
williamr@2
|
910 |
STACK_OF(SSL_CIPHER) *cipher_list_by_id;
|
williamr@2
|
911 |
|
williamr@2
|
912 |
/* These are the ones being used, the ones in SSL_SESSION are
|
williamr@2
|
913 |
* the ones to be 'copied' into these ones */
|
williamr@2
|
914 |
|
williamr@2
|
915 |
EVP_CIPHER_CTX *enc_read_ctx; /* cryptographic state */
|
williamr@2
|
916 |
const EVP_MD *read_hash; /* used for mac generation */
|
williamr@2
|
917 |
#ifndef OPENSSL_NO_COMP
|
williamr@2
|
918 |
COMP_CTX *expand; /* uncompress */
|
williamr@2
|
919 |
#else
|
williamr@2
|
920 |
char *expand;
|
williamr@2
|
921 |
#endif
|
williamr@2
|
922 |
|
williamr@2
|
923 |
EVP_CIPHER_CTX *enc_write_ctx; /* cryptographic state */
|
williamr@2
|
924 |
const EVP_MD *write_hash; /* used for mac generation */
|
williamr@2
|
925 |
#ifndef OPENSSL_NO_COMP
|
williamr@2
|
926 |
COMP_CTX *compress; /* compression */
|
williamr@2
|
927 |
#else
|
williamr@2
|
928 |
char *compress;
|
williamr@2
|
929 |
#endif
|
williamr@2
|
930 |
|
williamr@2
|
931 |
/* session info */
|
williamr@2
|
932 |
|
williamr@2
|
933 |
/* client cert? */
|
williamr@2
|
934 |
/* This is used to hold the server certificate used */
|
williamr@2
|
935 |
struct cert_st /* CERT */ *cert;
|
williamr@2
|
936 |
|
williamr@2
|
937 |
/* the session_id_context is used to ensure sessions are only reused
|
williamr@2
|
938 |
* in the appropriate context */
|
williamr@2
|
939 |
unsigned int sid_ctx_length;
|
williamr@2
|
940 |
unsigned char sid_ctx[SSL_MAX_SID_CTX_LENGTH];
|
williamr@2
|
941 |
|
williamr@2
|
942 |
/* This can also be in the session once a session is established */
|
williamr@2
|
943 |
SSL_SESSION *session;
|
williamr@2
|
944 |
|
williamr@2
|
945 |
/* Default generate session ID callback. */
|
williamr@2
|
946 |
GEN_SESSION_CB generate_session_id;
|
williamr@2
|
947 |
|
williamr@2
|
948 |
/* Used in SSL2 and SSL3 */
|
williamr@2
|
949 |
int verify_mode; /* 0 don't care about verify failure.
|
williamr@2
|
950 |
* 1 fail if verify fails */
|
williamr@2
|
951 |
int (*verify_callback)(int ok,X509_STORE_CTX *ctx); /* fail if callback returns 0 */
|
williamr@2
|
952 |
|
williamr@2
|
953 |
void (*info_callback)(const SSL *ssl,int type,int val); /* optional informational callback */
|
williamr@2
|
954 |
|
williamr@2
|
955 |
int error; /* error bytes to be written */
|
williamr@2
|
956 |
int error_code; /* actual code */
|
williamr@2
|
957 |
|
williamr@2
|
958 |
#ifndef OPENSSL_NO_KRB5
|
williamr@2
|
959 |
KSSL_CTX *kssl_ctx; /* Kerberos 5 context */
|
williamr@2
|
960 |
#endif /* OPENSSL_NO_KRB5 */
|
williamr@2
|
961 |
|
williamr@2
|
962 |
SSL_CTX *ctx;
|
williamr@2
|
963 |
/* set this flag to 1 and a sleep(1) is put into all SSL_read()
|
williamr@2
|
964 |
* and SSL_write() calls, good for nbio debuging :-) */
|
williamr@2
|
965 |
int debug;
|
williamr@2
|
966 |
|
williamr@2
|
967 |
/* extra application data */
|
williamr@2
|
968 |
long verify_result;
|
williamr@2
|
969 |
CRYPTO_EX_DATA ex_data;
|
williamr@2
|
970 |
|
williamr@2
|
971 |
/* for server side, keep the list of CA_dn we can use */
|
williamr@2
|
972 |
STACK_OF(X509_NAME) *client_CA;
|
williamr@2
|
973 |
|
williamr@2
|
974 |
int references;
|
williamr@2
|
975 |
unsigned long options; /* protocol behaviour */
|
williamr@2
|
976 |
unsigned long mode; /* API behaviour */
|
williamr@2
|
977 |
long max_cert_list;
|
williamr@2
|
978 |
int first_packet;
|
williamr@2
|
979 |
int client_version; /* what was passed, used for
|
williamr@2
|
980 |
* SSLv3/TLS rollback check */
|
williamr@2
|
981 |
|
williamr@2
|
982 |
};
|
williamr@2
|
983 |
|
williamr@2
|
984 |
#ifdef __cplusplus
|
williamr@2
|
985 |
}
|
williamr@2
|
986 |
#endif
|
williamr@2
|
987 |
|
williamr@2
|
988 |
#include <openssl/ssl2.h>
|
williamr@2
|
989 |
#include <openssl/ssl3.h>
|
williamr@2
|
990 |
#include <openssl/tls1.h> /* This is mostly sslv3 with a few tweaks */
|
williamr@2
|
991 |
#include <openssl/dtls1.h> /* Datagram TLS */
|
williamr@2
|
992 |
#include <openssl/ssl23.h>
|
williamr@2
|
993 |
|
williamr@2
|
994 |
#ifdef __cplusplus
|
williamr@2
|
995 |
extern "C" {
|
williamr@2
|
996 |
#endif
|
williamr@2
|
997 |
|
williamr@2
|
998 |
/* compatibility */
|
williamr@2
|
999 |
#define SSL_set_app_data(s,arg) (SSL_set_ex_data(s,0,(char *)arg))
|
williamr@2
|
1000 |
#define SSL_get_app_data(s) (SSL_get_ex_data(s,0))
|
williamr@2
|
1001 |
#define SSL_SESSION_set_app_data(s,a) (SSL_SESSION_set_ex_data(s,0,(char *)a))
|
williamr@2
|
1002 |
#define SSL_SESSION_get_app_data(s) (SSL_SESSION_get_ex_data(s,0))
|
williamr@2
|
1003 |
#define SSL_CTX_get_app_data(ctx) (SSL_CTX_get_ex_data(ctx,0))
|
williamr@2
|
1004 |
#define SSL_CTX_set_app_data(ctx,arg) (SSL_CTX_set_ex_data(ctx,0,(char *)arg))
|
williamr@2
|
1005 |
|
williamr@2
|
1006 |
/* The following are the possible values for ssl->state are are
|
williamr@2
|
1007 |
* used to indicate where we are up to in the SSL connection establishment.
|
williamr@2
|
1008 |
* The macros that follow are about the only things you should need to use
|
williamr@2
|
1009 |
* and even then, only when using non-blocking IO.
|
williamr@2
|
1010 |
* It can also be useful to work out where you were when the connection
|
williamr@2
|
1011 |
* failed */
|
williamr@2
|
1012 |
|
williamr@2
|
1013 |
#define SSL_ST_CONNECT 0x1000
|
williamr@2
|
1014 |
#define SSL_ST_ACCEPT 0x2000
|
williamr@2
|
1015 |
#define SSL_ST_MASK 0x0FFF
|
williamr@2
|
1016 |
#define SSL_ST_INIT (SSL_ST_CONNECT|SSL_ST_ACCEPT)
|
williamr@2
|
1017 |
#define SSL_ST_BEFORE 0x4000
|
williamr@2
|
1018 |
#define SSL_ST_OK 0x03
|
williamr@2
|
1019 |
#define SSL_ST_RENEGOTIATE (0x04|SSL_ST_INIT)
|
williamr@2
|
1020 |
|
williamr@2
|
1021 |
#define SSL_CB_LOOP 0x01
|
williamr@2
|
1022 |
#define SSL_CB_EXIT 0x02
|
williamr@2
|
1023 |
#define SSL_CB_READ 0x04
|
williamr@2
|
1024 |
#define SSL_CB_WRITE 0x08
|
williamr@2
|
1025 |
#define SSL_CB_ALERT 0x4000 /* used in callback */
|
williamr@2
|
1026 |
#define SSL_CB_READ_ALERT (SSL_CB_ALERT|SSL_CB_READ)
|
williamr@2
|
1027 |
#define SSL_CB_WRITE_ALERT (SSL_CB_ALERT|SSL_CB_WRITE)
|
williamr@2
|
1028 |
#define SSL_CB_ACCEPT_LOOP (SSL_ST_ACCEPT|SSL_CB_LOOP)
|
williamr@2
|
1029 |
#define SSL_CB_ACCEPT_EXIT (SSL_ST_ACCEPT|SSL_CB_EXIT)
|
williamr@2
|
1030 |
#define SSL_CB_CONNECT_LOOP (SSL_ST_CONNECT|SSL_CB_LOOP)
|
williamr@2
|
1031 |
#define SSL_CB_CONNECT_EXIT (SSL_ST_CONNECT|SSL_CB_EXIT)
|
williamr@2
|
1032 |
#define SSL_CB_HANDSHAKE_START 0x10
|
williamr@2
|
1033 |
#define SSL_CB_HANDSHAKE_DONE 0x20
|
williamr@2
|
1034 |
|
williamr@2
|
1035 |
/* Is the SSL_connection established? */
|
williamr@2
|
1036 |
#define SSL_get_state(a) SSL_state(a)
|
williamr@2
|
1037 |
#define SSL_is_init_finished(a) (SSL_state(a) == SSL_ST_OK)
|
williamr@2
|
1038 |
#define SSL_in_init(a) (SSL_state(a)&SSL_ST_INIT)
|
williamr@2
|
1039 |
#define SSL_in_before(a) (SSL_state(a)&SSL_ST_BEFORE)
|
williamr@2
|
1040 |
#define SSL_in_connect_init(a) (SSL_state(a)&SSL_ST_CONNECT)
|
williamr@2
|
1041 |
#define SSL_in_accept_init(a) (SSL_state(a)&SSL_ST_ACCEPT)
|
williamr@2
|
1042 |
|
williamr@2
|
1043 |
/* The following 2 states are kept in ssl->rstate when reads fail,
|
williamr@2
|
1044 |
* you should not need these */
|
williamr@2
|
1045 |
#define SSL_ST_READ_HEADER 0xF0
|
williamr@2
|
1046 |
#define SSL_ST_READ_BODY 0xF1
|
williamr@2
|
1047 |
#define SSL_ST_READ_DONE 0xF2
|
williamr@2
|
1048 |
|
williamr@2
|
1049 |
/* Obtain latest Finished message
|
williamr@2
|
1050 |
* -- that we sent (SSL_get_finished)
|
williamr@2
|
1051 |
* -- that we expected from peer (SSL_get_peer_finished).
|
williamr@2
|
1052 |
* Returns length (0 == no Finished so far), copies up to 'count' bytes. */
|
williamr@2
|
1053 |
IMPORT_C size_t SSL_get_finished(const SSL *s, void *buf, size_t count);
|
williamr@2
|
1054 |
IMPORT_C size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
|
williamr@2
|
1055 |
|
williamr@2
|
1056 |
/* use either SSL_VERIFY_NONE or SSL_VERIFY_PEER, the last 2 options
|
williamr@2
|
1057 |
* are 'ored' with SSL_VERIFY_PEER if they are desired */
|
williamr@2
|
1058 |
#define SSL_VERIFY_NONE 0x00
|
williamr@2
|
1059 |
#define SSL_VERIFY_PEER 0x01
|
williamr@2
|
1060 |
#define SSL_VERIFY_FAIL_IF_NO_PEER_CERT 0x02
|
williamr@2
|
1061 |
#define SSL_VERIFY_CLIENT_ONCE 0x04
|
williamr@2
|
1062 |
|
williamr@2
|
1063 |
#define OpenSSL_add_ssl_algorithms() SSL_library_init()
|
williamr@2
|
1064 |
#define SSLeay_add_ssl_algorithms() SSL_library_init()
|
williamr@2
|
1065 |
|
williamr@2
|
1066 |
/* this is for backward compatibility */
|
williamr@2
|
1067 |
#if 0 /* NEW_SSLEAY */
|
williamr@2
|
1068 |
#define SSL_CTX_set_default_verify(a,b,c) SSL_CTX_set_verify(a,b,c)
|
williamr@2
|
1069 |
#define SSL_set_pref_cipher(c,n) SSL_set_cipher_list(c,n)
|
williamr@2
|
1070 |
#define SSL_add_session(a,b) SSL_CTX_add_session((a),(b))
|
williamr@2
|
1071 |
#define SSL_remove_session(a,b) SSL_CTX_remove_session((a),(b))
|
williamr@2
|
1072 |
#define SSL_flush_sessions(a,b) SSL_CTX_flush_sessions((a),(b))
|
williamr@2
|
1073 |
#endif
|
williamr@2
|
1074 |
/* More backward compatibility */
|
williamr@2
|
1075 |
#define SSL_get_cipher(s) \
|
williamr@2
|
1076 |
SSL_CIPHER_get_name(SSL_get_current_cipher(s))
|
williamr@2
|
1077 |
#define SSL_get_cipher_bits(s,np) \
|
williamr@2
|
1078 |
SSL_CIPHER_get_bits(SSL_get_current_cipher(s),np)
|
williamr@2
|
1079 |
#define SSL_get_cipher_version(s) \
|
williamr@2
|
1080 |
SSL_CIPHER_get_version(SSL_get_current_cipher(s))
|
williamr@2
|
1081 |
#define SSL_get_cipher_name(s) \
|
williamr@2
|
1082 |
SSL_CIPHER_get_name(SSL_get_current_cipher(s))
|
williamr@2
|
1083 |
#define SSL_get_time(a) SSL_SESSION_get_time(a)
|
williamr@2
|
1084 |
#define SSL_set_time(a,b) SSL_SESSION_set_time((a),(b))
|
williamr@2
|
1085 |
#define SSL_get_timeout(a) SSL_SESSION_get_timeout(a)
|
williamr@2
|
1086 |
#define SSL_set_timeout(a,b) SSL_SESSION_set_timeout((a),(b))
|
williamr@2
|
1087 |
|
williamr@2
|
1088 |
#if 1 /*SSLEAY_MACROS*/
|
williamr@2
|
1089 |
#define d2i_SSL_SESSION_bio(bp,s_id) ASN1_d2i_bio_of(SSL_SESSION,SSL_SESSION_new,d2i_SSL_SESSION,bp,s_id)
|
williamr@2
|
1090 |
#define i2d_SSL_SESSION_bio(bp,s_id) ASN1_i2d_bio_of(SSL_SESSION,i2d_SSL_SESSION,bp,s_id)
|
williamr@2
|
1091 |
#define PEM_read_SSL_SESSION(fp,x,cb,u) (SSL_SESSION *)PEM_ASN1_read( \
|
williamr@2
|
1092 |
(char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb,u)
|
williamr@2
|
1093 |
#define PEM_read_bio_SSL_SESSION(bp,x,cb,u) PEM_ASN1_read_bio_of(SSL_SESSION,d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,cb,u)
|
williamr@2
|
1094 |
#define PEM_write_SSL_SESSION(fp,x) \
|
williamr@2
|
1095 |
PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \
|
williamr@2
|
1096 |
PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL,NULL)
|
williamr@2
|
1097 |
#define PEM_write_bio_SSL_SESSION(bp,x) \
|
williamr@2
|
1098 |
PEM_ASN1_write_bio_of(SSL_SESSION,i2d_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,x,NULL,NULL,0,NULL,NULL)
|
williamr@2
|
1099 |
#endif
|
williamr@2
|
1100 |
|
williamr@2
|
1101 |
#define SSL_AD_REASON_OFFSET 1000
|
williamr@2
|
1102 |
/* These alert types are for SSLv3 and TLSv1 */
|
williamr@2
|
1103 |
#define SSL_AD_CLOSE_NOTIFY SSL3_AD_CLOSE_NOTIFY
|
williamr@2
|
1104 |
#define SSL_AD_UNEXPECTED_MESSAGE SSL3_AD_UNEXPECTED_MESSAGE /* fatal */
|
williamr@2
|
1105 |
#define SSL_AD_BAD_RECORD_MAC SSL3_AD_BAD_RECORD_MAC /* fatal */
|
williamr@2
|
1106 |
#define SSL_AD_DECRYPTION_FAILED TLS1_AD_DECRYPTION_FAILED
|
williamr@2
|
1107 |
#define SSL_AD_RECORD_OVERFLOW TLS1_AD_RECORD_OVERFLOW
|
williamr@2
|
1108 |
#define SSL_AD_DECOMPRESSION_FAILURE SSL3_AD_DECOMPRESSION_FAILURE/* fatal */
|
williamr@2
|
1109 |
#define SSL_AD_HANDSHAKE_FAILURE SSL3_AD_HANDSHAKE_FAILURE/* fatal */
|
williamr@2
|
1110 |
#define SSL_AD_NO_CERTIFICATE SSL3_AD_NO_CERTIFICATE /* Not for TLS */
|
williamr@2
|
1111 |
#define SSL_AD_BAD_CERTIFICATE SSL3_AD_BAD_CERTIFICATE
|
williamr@2
|
1112 |
#define SSL_AD_UNSUPPORTED_CERTIFICATE SSL3_AD_UNSUPPORTED_CERTIFICATE
|
williamr@2
|
1113 |
#define SSL_AD_CERTIFICATE_REVOKED SSL3_AD_CERTIFICATE_REVOKED
|
williamr@2
|
1114 |
#define SSL_AD_CERTIFICATE_EXPIRED SSL3_AD_CERTIFICATE_EXPIRED
|
williamr@2
|
1115 |
#define SSL_AD_CERTIFICATE_UNKNOWN SSL3_AD_CERTIFICATE_UNKNOWN
|
williamr@2
|
1116 |
#define SSL_AD_ILLEGAL_PARAMETER SSL3_AD_ILLEGAL_PARAMETER /* fatal */
|
williamr@2
|
1117 |
#define SSL_AD_UNKNOWN_CA TLS1_AD_UNKNOWN_CA /* fatal */
|
williamr@2
|
1118 |
#define SSL_AD_ACCESS_DENIED TLS1_AD_ACCESS_DENIED /* fatal */
|
williamr@2
|
1119 |
#define SSL_AD_DECODE_ERROR TLS1_AD_DECODE_ERROR /* fatal */
|
williamr@2
|
1120 |
#define SSL_AD_DECRYPT_ERROR TLS1_AD_DECRYPT_ERROR
|
williamr@2
|
1121 |
#define SSL_AD_EXPORT_RESTRICTION TLS1_AD_EXPORT_RESTRICTION/* fatal */
|
williamr@2
|
1122 |
#define SSL_AD_PROTOCOL_VERSION TLS1_AD_PROTOCOL_VERSION /* fatal */
|
williamr@2
|
1123 |
#define SSL_AD_INSUFFICIENT_SECURITY TLS1_AD_INSUFFICIENT_SECURITY/* fatal */
|
williamr@2
|
1124 |
#define SSL_AD_INTERNAL_ERROR TLS1_AD_INTERNAL_ERROR /* fatal */
|
williamr@2
|
1125 |
#define SSL_AD_USER_CANCELLED TLS1_AD_USER_CANCELLED
|
williamr@2
|
1126 |
#define SSL_AD_NO_RENEGOTIATION TLS1_AD_NO_RENEGOTIATION
|
williamr@2
|
1127 |
#define SSL_AD_UNSUPPORTED_EXTENSION TLS1_AD_UNSUPPORTED_EXTENSION
|
williamr@2
|
1128 |
#define SSL_AD_CERTIFICATE_UNOBTAINABLE TLS1_AD_CERTIFICATE_UNOBTAINABLE
|
williamr@2
|
1129 |
#define SSL_AD_UNRECOGNIZED_NAME TLS1_AD_UNRECOGNIZED_NAME
|
williamr@2
|
1130 |
|
williamr@2
|
1131 |
#define SSL_ERROR_NONE 0
|
williamr@2
|
1132 |
#define SSL_ERROR_SSL 1
|
williamr@2
|
1133 |
#define SSL_ERROR_WANT_READ 2
|
williamr@2
|
1134 |
#define SSL_ERROR_WANT_WRITE 3
|
williamr@2
|
1135 |
#define SSL_ERROR_WANT_X509_LOOKUP 4
|
williamr@2
|
1136 |
#define SSL_ERROR_SYSCALL 5 /* look at error stack/return value/errno */
|
williamr@2
|
1137 |
#define SSL_ERROR_ZERO_RETURN 6
|
williamr@2
|
1138 |
#define SSL_ERROR_WANT_CONNECT 7
|
williamr@2
|
1139 |
#define SSL_ERROR_WANT_ACCEPT 8
|
williamr@2
|
1140 |
|
williamr@2
|
1141 |
#define SSL_CTRL_NEED_TMP_RSA 1
|
williamr@2
|
1142 |
#define SSL_CTRL_SET_TMP_RSA 2
|
williamr@2
|
1143 |
#define SSL_CTRL_SET_TMP_DH 3
|
williamr@2
|
1144 |
#define SSL_CTRL_SET_TMP_ECDH 4
|
williamr@2
|
1145 |
#define SSL_CTRL_SET_TMP_RSA_CB 5
|
williamr@2
|
1146 |
#define SSL_CTRL_SET_TMP_DH_CB 6
|
williamr@2
|
1147 |
#define SSL_CTRL_SET_TMP_ECDH_CB 7
|
williamr@2
|
1148 |
|
williamr@2
|
1149 |
#define SSL_CTRL_GET_SESSION_REUSED 8
|
williamr@2
|
1150 |
#define SSL_CTRL_GET_CLIENT_CERT_REQUEST 9
|
williamr@2
|
1151 |
#define SSL_CTRL_GET_NUM_RENEGOTIATIONS 10
|
williamr@2
|
1152 |
#define SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS 11
|
williamr@2
|
1153 |
#define SSL_CTRL_GET_TOTAL_RENEGOTIATIONS 12
|
williamr@2
|
1154 |
#define SSL_CTRL_GET_FLAGS 13
|
williamr@2
|
1155 |
#define SSL_CTRL_EXTRA_CHAIN_CERT 14
|
williamr@2
|
1156 |
|
williamr@2
|
1157 |
#define SSL_CTRL_SET_MSG_CALLBACK 15
|
williamr@2
|
1158 |
#define SSL_CTRL_SET_MSG_CALLBACK_ARG 16
|
williamr@2
|
1159 |
|
williamr@2
|
1160 |
/* only applies to datagram connections */
|
williamr@2
|
1161 |
#define SSL_CTRL_SET_MTU 17
|
williamr@2
|
1162 |
/* Stats */
|
williamr@2
|
1163 |
#define SSL_CTRL_SESS_NUMBER 20
|
williamr@2
|
1164 |
#define SSL_CTRL_SESS_CONNECT 21
|
williamr@2
|
1165 |
#define SSL_CTRL_SESS_CONNECT_GOOD 22
|
williamr@2
|
1166 |
#define SSL_CTRL_SESS_CONNECT_RENEGOTIATE 23
|
williamr@2
|
1167 |
#define SSL_CTRL_SESS_ACCEPT 24
|
williamr@2
|
1168 |
#define SSL_CTRL_SESS_ACCEPT_GOOD 25
|
williamr@2
|
1169 |
#define SSL_CTRL_SESS_ACCEPT_RENEGOTIATE 26
|
williamr@2
|
1170 |
#define SSL_CTRL_SESS_HIT 27
|
williamr@2
|
1171 |
#define SSL_CTRL_SESS_CB_HIT 28
|
williamr@2
|
1172 |
#define SSL_CTRL_SESS_MISSES 29
|
williamr@2
|
1173 |
#define SSL_CTRL_SESS_TIMEOUTS 30
|
williamr@2
|
1174 |
#define SSL_CTRL_SESS_CACHE_FULL 31
|
williamr@2
|
1175 |
#define SSL_CTRL_OPTIONS 32
|
williamr@2
|
1176 |
#define SSL_CTRL_MODE 33
|
williamr@2
|
1177 |
|
williamr@2
|
1178 |
#define SSL_CTRL_GET_READ_AHEAD 40
|
williamr@2
|
1179 |
#define SSL_CTRL_SET_READ_AHEAD 41
|
williamr@2
|
1180 |
#define SSL_CTRL_SET_SESS_CACHE_SIZE 42
|
williamr@2
|
1181 |
#define SSL_CTRL_GET_SESS_CACHE_SIZE 43
|
williamr@2
|
1182 |
#define SSL_CTRL_SET_SESS_CACHE_MODE 44
|
williamr@2
|
1183 |
#define SSL_CTRL_GET_SESS_CACHE_MODE 45
|
williamr@2
|
1184 |
|
williamr@2
|
1185 |
#define SSL_CTRL_GET_MAX_CERT_LIST 50
|
williamr@2
|
1186 |
#define SSL_CTRL_SET_MAX_CERT_LIST 51
|
williamr@2
|
1187 |
|
williamr@2
|
1188 |
#define SSL_session_reused(ssl) \
|
williamr@2
|
1189 |
SSL_ctrl((ssl),SSL_CTRL_GET_SESSION_REUSED,0,NULL)
|
williamr@2
|
1190 |
#define SSL_num_renegotiations(ssl) \
|
williamr@2
|
1191 |
SSL_ctrl((ssl),SSL_CTRL_GET_NUM_RENEGOTIATIONS,0,NULL)
|
williamr@2
|
1192 |
#define SSL_clear_num_renegotiations(ssl) \
|
williamr@2
|
1193 |
SSL_ctrl((ssl),SSL_CTRL_CLEAR_NUM_RENEGOTIATIONS,0,NULL)
|
williamr@2
|
1194 |
#define SSL_total_renegotiations(ssl) \
|
williamr@2
|
1195 |
SSL_ctrl((ssl),SSL_CTRL_GET_TOTAL_RENEGOTIATIONS,0,NULL)
|
williamr@2
|
1196 |
|
williamr@2
|
1197 |
#define SSL_CTX_need_tmp_RSA(ctx) \
|
williamr@2
|
1198 |
SSL_CTX_ctrl(ctx,SSL_CTRL_NEED_TMP_RSA,0,NULL)
|
williamr@2
|
1199 |
#define SSL_CTX_set_tmp_rsa(ctx,rsa) \
|
williamr@2
|
1200 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
|
williamr@2
|
1201 |
#define SSL_CTX_set_tmp_dh(ctx,dh) \
|
williamr@2
|
1202 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
|
williamr@2
|
1203 |
#define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
|
williamr@2
|
1204 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
|
williamr@2
|
1205 |
|
williamr@2
|
1206 |
#define SSL_need_tmp_RSA(ssl) \
|
williamr@2
|
1207 |
SSL_ctrl(ssl,SSL_CTRL_NEED_TMP_RSA,0,NULL)
|
williamr@2
|
1208 |
#define SSL_set_tmp_rsa(ssl,rsa) \
|
williamr@2
|
1209 |
SSL_ctrl(ssl,SSL_CTRL_SET_TMP_RSA,0,(char *)rsa)
|
williamr@2
|
1210 |
#define SSL_set_tmp_dh(ssl,dh) \
|
williamr@2
|
1211 |
SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)dh)
|
williamr@2
|
1212 |
#define SSL_set_tmp_ecdh(ssl,ecdh) \
|
williamr@2
|
1213 |
SSL_ctrl(ssl,SSL_CTRL_SET_TMP_ECDH,0,(char *)ecdh)
|
williamr@2
|
1214 |
|
williamr@2
|
1215 |
#define SSL_CTX_add_extra_chain_cert(ctx,x509) \
|
williamr@2
|
1216 |
SSL_CTX_ctrl(ctx,SSL_CTRL_EXTRA_CHAIN_CERT,0,(char *)x509)
|
williamr@2
|
1217 |
|
williamr@2
|
1218 |
#ifndef OPENSSL_NO_BIO
|
williamr@2
|
1219 |
IMPORT_C BIO_METHOD *BIO_f_ssl(void);
|
williamr@2
|
1220 |
IMPORT_C BIO *BIO_new_ssl(SSL_CTX *ctx,int client);
|
williamr@2
|
1221 |
IMPORT_C BIO *BIO_new_ssl_connect(SSL_CTX *ctx);
|
williamr@2
|
1222 |
IMPORT_C BIO *BIO_new_buffer_ssl_connect(SSL_CTX *ctx);
|
williamr@2
|
1223 |
IMPORT_C int BIO_ssl_copy_session_id(BIO *to,BIO *from);
|
williamr@2
|
1224 |
IMPORT_C void BIO_ssl_shutdown(BIO *ssl_bio);
|
williamr@2
|
1225 |
|
williamr@2
|
1226 |
#endif
|
williamr@2
|
1227 |
|
williamr@2
|
1228 |
IMPORT_C int SSL_CTX_set_cipher_list(SSL_CTX *,const char *str);
|
williamr@2
|
1229 |
IMPORT_C SSL_CTX *SSL_CTX_new(SSL_METHOD *meth);
|
williamr@2
|
1230 |
IMPORT_C void SSL_CTX_free(SSL_CTX *);
|
williamr@2
|
1231 |
IMPORT_C long SSL_CTX_set_timeout(SSL_CTX *ctx,long t);
|
williamr@2
|
1232 |
IMPORT_C long SSL_CTX_get_timeout(const SSL_CTX *ctx);
|
williamr@2
|
1233 |
IMPORT_C X509_STORE *SSL_CTX_get_cert_store(const SSL_CTX *);
|
williamr@2
|
1234 |
IMPORT_C void SSL_CTX_set_cert_store(SSL_CTX *,X509_STORE *);
|
williamr@2
|
1235 |
IMPORT_C int SSL_want(const SSL *s);
|
williamr@2
|
1236 |
IMPORT_C int SSL_clear(SSL *s);
|
williamr@2
|
1237 |
|
williamr@2
|
1238 |
IMPORT_C void SSL_CTX_flush_sessions(SSL_CTX *ctx,long tm);
|
williamr@2
|
1239 |
IMPORT_C void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,
|
williamr@2
|
1240 |
int (*cb)(struct ssl_st *ssl,SSL_SESSION *sess));
|
williamr@2
|
1241 |
IMPORT_C int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(SSL *ssl, SSL_SESSION *sess);
|
williamr@2
|
1242 |
|
williamr@2
|
1243 |
IMPORT_C void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx,
|
williamr@2
|
1244 |
void (*cb)(SSL_CTX *ctx,SSL_SESSION *sess));
|
williamr@2
|
1245 |
IMPORT_C void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(SSL_CTX * ctx,SSL_SESSION *sess);
|
williamr@2
|
1246 |
IMPORT_C void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx,
|
williamr@2
|
1247 |
SSL_SESSION *(*cb)(struct ssl_st *ssl,
|
williamr@2
|
1248 |
unsigned char *data,int len,int *copy));
|
williamr@2
|
1249 |
IMPORT_C SSL_SESSION * (*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl,
|
williamr@2
|
1250 |
unsigned char *data,int len,int *copy);
|
williamr@2
|
1251 |
IMPORT_C void SSL_CTX_set_info_callback(SSL_CTX *ctx,
|
williamr@2
|
1252 |
void (*cb)(const SSL *ssl,int type,int val));
|
williamr@2
|
1253 |
IMPORT_C void (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl,int type,int val);
|
williamr@2
|
1254 |
IMPORT_C void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx,
|
williamr@2
|
1255 |
int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey));
|
williamr@2
|
1256 |
IMPORT_C int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL * ssl, X509 ** x509 , EVP_PKEY **pkey);
|
williamr@2
|
1257 |
IMPORT_C void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx,
|
williamr@2
|
1258 |
int (*cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len));
|
williamr@2
|
1259 |
IMPORT_C void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx,
|
williamr@2
|
1260 |
int (*cb)(SSL *ssl, unsigned char *cookie, unsigned int cookie_len));
|
williamr@2
|
1261 |
|
williamr@2
|
1262 |
|
williamr@2
|
1263 |
IMPORT_C SSL_CIPHER *SSL_get_current_cipher(const SSL *s);
|
williamr@2
|
1264 |
IMPORT_C int SSL_CIPHER_get_bits(const SSL_CIPHER *c,int *alg_bits);
|
williamr@2
|
1265 |
IMPORT_C char * SSL_CIPHER_get_version(const SSL_CIPHER *c);
|
williamr@2
|
1266 |
IMPORT_C const char * SSL_CIPHER_get_name(const SSL_CIPHER *c);
|
williamr@2
|
1267 |
|
williamr@2
|
1268 |
IMPORT_C int SSL_get_fd(const SSL *s);
|
williamr@2
|
1269 |
IMPORT_C int SSL_get_rfd(const SSL *s);
|
williamr@2
|
1270 |
IMPORT_C int SSL_get_wfd(const SSL *s);
|
williamr@2
|
1271 |
IMPORT_C const char * SSL_get_cipher_list(const SSL *s,int n);
|
williamr@2
|
1272 |
IMPORT_C char * SSL_get_shared_ciphers(const SSL *s, char *buf, int len);
|
williamr@2
|
1273 |
IMPORT_C int SSL_get_read_ahead(const SSL * s);
|
williamr@2
|
1274 |
IMPORT_C int SSL_pending(const SSL *s);
|
williamr@2
|
1275 |
#ifndef OPENSSL_NO_SOCK
|
williamr@2
|
1276 |
IMPORT_C int SSL_set_fd(SSL *s, int fd);
|
williamr@2
|
1277 |
IMPORT_C int SSL_set_rfd(SSL *s, int fd);
|
williamr@2
|
1278 |
IMPORT_C int SSL_set_wfd(SSL *s, int fd);
|
williamr@2
|
1279 |
#endif
|
williamr@2
|
1280 |
#ifndef OPENSSL_NO_BIO
|
williamr@2
|
1281 |
IMPORT_C void SSL_set_bio(SSL *s, BIO *rbio,BIO *wbio);
|
williamr@2
|
1282 |
IMPORT_C BIO * SSL_get_rbio(const SSL *s);
|
williamr@2
|
1283 |
IMPORT_C BIO * SSL_get_wbio(const SSL *s);
|
williamr@2
|
1284 |
#endif
|
williamr@2
|
1285 |
IMPORT_C int SSL_set_cipher_list(SSL *s, const char *str);
|
williamr@2
|
1286 |
IMPORT_C void SSL_set_read_ahead(SSL *s, int yes);
|
williamr@2
|
1287 |
IMPORT_C int SSL_get_verify_mode(const SSL *s);
|
williamr@2
|
1288 |
IMPORT_C int SSL_get_verify_depth(const SSL *s);
|
williamr@2
|
1289 |
IMPORT_C int (*SSL_get_verify_callback(const SSL *s))(int,X509_STORE_CTX *);
|
williamr@2
|
1290 |
IMPORT_C void SSL_set_verify(SSL *s, int mode,
|
williamr@2
|
1291 |
int (*callback)(int ok,X509_STORE_CTX *ctx));
|
williamr@2
|
1292 |
IMPORT_C void SSL_set_verify_depth(SSL *s, int depth);
|
williamr@2
|
1293 |
#ifndef OPENSSL_NO_RSA
|
williamr@2
|
1294 |
IMPORT_C int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa);
|
williamr@2
|
1295 |
#endif
|
williamr@2
|
1296 |
IMPORT_C int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len);
|
williamr@2
|
1297 |
IMPORT_C int SSL_use_PrivateKey(SSL *ssl, EVP_PKEY *pkey);
|
williamr@2
|
1298 |
IMPORT_C int SSL_use_PrivateKey_ASN1(int pk,SSL *ssl, const unsigned char *d, long len);
|
williamr@2
|
1299 |
IMPORT_C int SSL_use_certificate(SSL *ssl, X509 *x);
|
williamr@2
|
1300 |
IMPORT_C int SSL_use_certificate_ASN1(SSL *ssl, const unsigned char *d, int len);
|
williamr@2
|
1301 |
|
williamr@2
|
1302 |
#ifndef OPENSSL_NO_STDIO
|
williamr@2
|
1303 |
IMPORT_C int SSL_use_RSAPrivateKey_file(SSL *ssl, const char *file, int type);
|
williamr@2
|
1304 |
IMPORT_C int SSL_use_PrivateKey_file(SSL *ssl, const char *file, int type);
|
williamr@2
|
1305 |
IMPORT_C int SSL_use_certificate_file(SSL *ssl, const char *file, int type);
|
williamr@2
|
1306 |
IMPORT_C int SSL_CTX_use_RSAPrivateKey_file(SSL_CTX *ctx, const char *file, int type);
|
williamr@2
|
1307 |
IMPORT_C int SSL_CTX_use_PrivateKey_file(SSL_CTX *ctx, const char *file, int type);
|
williamr@2
|
1308 |
IMPORT_C int SSL_CTX_use_certificate_file(SSL_CTX *ctx, const char *file, int type);
|
williamr@2
|
1309 |
IMPORT_C int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file); /* PEM type */
|
williamr@2
|
1310 |
IMPORT_C STACK_OF(X509_NAME) *SSL_load_client_CA_file(const char *file);
|
williamr@2
|
1311 |
IMPORT_C int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
williamr@2
|
1312 |
const char *file);
|
williamr@2
|
1313 |
#ifndef OPENSSL_SYS_VMS
|
williamr@2
|
1314 |
#ifndef OPENSSL_SYS_MACINTOSH_CLASSIC /* XXXXX: Better scheme needed! [was: #ifndef MAC_OS_pre_X] */
|
williamr@2
|
1315 |
IMPORT_C int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
williamr@2
|
1316 |
const char *dir);
|
williamr@2
|
1317 |
#endif
|
williamr@2
|
1318 |
#endif
|
williamr@2
|
1319 |
|
williamr@2
|
1320 |
#endif
|
williamr@2
|
1321 |
|
williamr@2
|
1322 |
IMPORT_C void SSL_load_error_strings(void );
|
williamr@2
|
1323 |
IMPORT_C const char *SSL_state_string(const SSL *s);
|
williamr@2
|
1324 |
IMPORT_C const char *SSL_rstate_string(const SSL *s);
|
williamr@2
|
1325 |
IMPORT_C const char *SSL_state_string_long(const SSL *s);
|
williamr@2
|
1326 |
IMPORT_C const char *SSL_rstate_string_long(const SSL *s);
|
williamr@2
|
1327 |
IMPORT_C long SSL_SESSION_get_time(const SSL_SESSION *s);
|
williamr@2
|
1328 |
IMPORT_C long SSL_SESSION_set_time(SSL_SESSION *s, long t);
|
williamr@2
|
1329 |
IMPORT_C long SSL_SESSION_get_timeout(const SSL_SESSION *s);
|
williamr@2
|
1330 |
IMPORT_C long SSL_SESSION_set_timeout(SSL_SESSION *s, long t);
|
williamr@2
|
1331 |
IMPORT_C void SSL_copy_session_id(SSL *to,const SSL *from);
|
williamr@2
|
1332 |
|
williamr@2
|
1333 |
IMPORT_C SSL_SESSION *SSL_SESSION_new(void);
|
williamr@2
|
1334 |
IMPORT_C unsigned long SSL_SESSION_hash(const SSL_SESSION *a);
|
williamr@2
|
1335 |
IMPORT_C const char *SSL_get_servername(const SSL *s, const int type);
|
williamr@2
|
1336 |
IMPORT_C int SSL_get_servername_type(const SSL *s);
|
williamr@2
|
1337 |
IMPORT_C int SSL_SESSION_cmp(const SSL_SESSION *a,const SSL_SESSION *b);
|
williamr@2
|
1338 |
IMPORT_C const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len);
|
williamr@2
|
1339 |
#ifndef OPENSSL_NO_FP_API
|
williamr@2
|
1340 |
IMPORT_C int SSL_SESSION_print_fp(FILE *fp,const SSL_SESSION *ses);
|
williamr@2
|
1341 |
#endif
|
williamr@2
|
1342 |
#ifndef OPENSSL_NO_BIO
|
williamr@2
|
1343 |
IMPORT_C int SSL_SESSION_print(BIO *fp,const SSL_SESSION *ses);
|
williamr@2
|
1344 |
#endif
|
williamr@2
|
1345 |
IMPORT_C void SSL_SESSION_free(SSL_SESSION *ses);
|
williamr@2
|
1346 |
IMPORT_C int i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp);
|
williamr@2
|
1347 |
IMPORT_C int SSL_set_session(SSL *to, SSL_SESSION *session);
|
williamr@2
|
1348 |
IMPORT_C int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c);
|
williamr@2
|
1349 |
IMPORT_C int SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c);
|
williamr@2
|
1350 |
IMPORT_C int SSL_CTX_set_generate_session_id(SSL_CTX *, GEN_SESSION_CB);
|
williamr@2
|
1351 |
IMPORT_C int SSL_set_generate_session_id(SSL *, GEN_SESSION_CB);
|
williamr@2
|
1352 |
IMPORT_C int SSL_has_matching_session_id(const SSL *ssl, const unsigned char *id,
|
williamr@2
|
1353 |
unsigned int id_len);
|
williamr@2
|
1354 |
IMPORT_C SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,const unsigned char **pp,
|
williamr@2
|
1355 |
long length);
|
williamr@2
|
1356 |
|
williamr@2
|
1357 |
#ifdef HEADER_X509_H
|
williamr@2
|
1358 |
IMPORT_C X509 * SSL_get_peer_certificate(const SSL *s);
|
williamr@2
|
1359 |
#endif
|
williamr@2
|
1360 |
|
williamr@2
|
1361 |
IMPORT_C STACK_OF(X509) *SSL_get_peer_cert_chain(const SSL *s);
|
williamr@2
|
1362 |
|
williamr@2
|
1363 |
IMPORT_C int SSL_CTX_get_verify_mode(const SSL_CTX *ctx);
|
williamr@2
|
1364 |
IMPORT_C int SSL_CTX_get_verify_depth(const SSL_CTX *ctx);
|
williamr@2
|
1365 |
IMPORT_C int (*SSL_CTX_get_verify_callback(const SSL_CTX *ctx))(int,X509_STORE_CTX *);
|
williamr@2
|
1366 |
IMPORT_C void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,
|
williamr@2
|
1367 |
int (*callback)(int, X509_STORE_CTX *));
|
williamr@2
|
1368 |
IMPORT_C void SSL_CTX_set_verify_depth(SSL_CTX *ctx,int depth);
|
williamr@2
|
1369 |
IMPORT_C void SSL_CTX_set_cert_verify_callback(SSL_CTX *ctx, int (*cb)(X509_STORE_CTX *,void *), void *arg);
|
williamr@2
|
1370 |
#ifndef OPENSSL_NO_RSA
|
williamr@2
|
1371 |
IMPORT_C int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa);
|
williamr@2
|
1372 |
#endif
|
williamr@2
|
1373 |
IMPORT_C int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, const unsigned char *d, long len);
|
williamr@2
|
1374 |
IMPORT_C int SSL_CTX_use_PrivateKey(SSL_CTX *ctx, EVP_PKEY *pkey);
|
williamr@2
|
1375 |
IMPORT_C int SSL_CTX_use_PrivateKey_ASN1(int pk,SSL_CTX *ctx,
|
williamr@2
|
1376 |
const unsigned char *d, long len);
|
williamr@2
|
1377 |
IMPORT_C int SSL_CTX_use_certificate(SSL_CTX *ctx, X509 *x);
|
williamr@2
|
1378 |
IMPORT_C int SSL_CTX_use_certificate_ASN1(SSL_CTX *ctx, int len, const unsigned char *d);
|
williamr@2
|
1379 |
|
williamr@2
|
1380 |
IMPORT_C void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx, pem_password_cb *cb);
|
williamr@2
|
1381 |
IMPORT_C void SSL_CTX_set_default_passwd_cb_userdata(SSL_CTX *ctx, void *u);
|
williamr@2
|
1382 |
|
williamr@2
|
1383 |
IMPORT_C int SSL_CTX_check_private_key(const SSL_CTX *ctx);
|
williamr@2
|
1384 |
IMPORT_C int SSL_check_private_key(const SSL *ctx);
|
williamr@2
|
1385 |
|
williamr@2
|
1386 |
IMPORT_C int SSL_CTX_set_session_id_context(SSL_CTX *ctx,const unsigned char *sid_ctx,
|
williamr@2
|
1387 |
unsigned int sid_ctx_len);
|
williamr@2
|
1388 |
|
williamr@2
|
1389 |
IMPORT_C SSL * SSL_new(SSL_CTX *ctx);
|
williamr@2
|
1390 |
IMPORT_C int SSL_set_session_id_context(SSL *ssl,const unsigned char *sid_ctx,
|
williamr@2
|
1391 |
unsigned int sid_ctx_len);
|
williamr@2
|
1392 |
|
williamr@2
|
1393 |
IMPORT_C int SSL_CTX_set_purpose(SSL_CTX *s, int purpose);
|
williamr@2
|
1394 |
IMPORT_C int SSL_set_purpose(SSL *s, int purpose);
|
williamr@2
|
1395 |
IMPORT_C int SSL_CTX_set_trust(SSL_CTX *s, int trust);
|
williamr@2
|
1396 |
IMPORT_C int SSL_set_trust(SSL *s, int trust);
|
williamr@2
|
1397 |
|
williamr@2
|
1398 |
IMPORT_C void SSL_free(SSL *ssl);
|
williamr@2
|
1399 |
IMPORT_C int SSL_accept(SSL *ssl);
|
williamr@2
|
1400 |
IMPORT_C int SSL_connect(SSL *ssl);
|
williamr@2
|
1401 |
IMPORT_C int SSL_read(SSL *ssl,void *buf,int num);
|
williamr@2
|
1402 |
IMPORT_C int SSL_peek(SSL *ssl,void *buf,int num);
|
williamr@2
|
1403 |
IMPORT_C int SSL_write(SSL *ssl,const void *buf,int num);
|
williamr@2
|
1404 |
IMPORT_C long SSL_ctrl(SSL *ssl,int cmd, long larg, void *parg);
|
williamr@2
|
1405 |
IMPORT_C long SSL_callback_ctrl(SSL *, int, void (*)(void));
|
williamr@2
|
1406 |
IMPORT_C long SSL_CTX_ctrl(SSL_CTX *ctx,int cmd, long larg, void *parg);
|
williamr@2
|
1407 |
IMPORT_C long SSL_CTX_callback_ctrl(SSL_CTX *, int, void (*)(void));
|
williamr@2
|
1408 |
|
williamr@2
|
1409 |
IMPORT_C int SSL_get_error(const SSL *s,int ret_code);
|
williamr@2
|
1410 |
IMPORT_C const char *SSL_get_version(const SSL *s);
|
williamr@2
|
1411 |
|
williamr@2
|
1412 |
/* This sets the 'default' SSL version that SSL_new() will create */
|
williamr@2
|
1413 |
IMPORT_C int SSL_CTX_set_ssl_version(SSL_CTX *ctx,SSL_METHOD *meth);
|
williamr@2
|
1414 |
|
williamr@2
|
1415 |
IMPORT_C SSL_METHOD *SSLv2_method(void); /* SSLv2 */
|
williamr@2
|
1416 |
IMPORT_C SSL_METHOD *SSLv2_server_method(void); /* SSLv2 */
|
williamr@2
|
1417 |
IMPORT_C SSL_METHOD *SSLv2_client_method(void); /* SSLv2 */
|
williamr@2
|
1418 |
|
williamr@2
|
1419 |
IMPORT_C SSL_METHOD *SSLv3_method(void); /* SSLv3 */
|
williamr@2
|
1420 |
IMPORT_C SSL_METHOD *SSLv3_server_method(void); /* SSLv3 */
|
williamr@2
|
1421 |
IMPORT_C SSL_METHOD *SSLv3_client_method(void); /* SSLv3 */
|
williamr@2
|
1422 |
|
williamr@2
|
1423 |
IMPORT_C SSL_METHOD *SSLv23_method(void); /* SSLv3 but can rollback to v2 */
|
williamr@2
|
1424 |
IMPORT_C SSL_METHOD *SSLv23_server_method(void); /* SSLv3 but can rollback to v2 */
|
williamr@2
|
1425 |
IMPORT_C SSL_METHOD *SSLv23_client_method(void); /* SSLv3 but can rollback to v2 */
|
williamr@2
|
1426 |
|
williamr@2
|
1427 |
IMPORT_C SSL_METHOD *TLSv1_method(void); /* TLSv1.0 */
|
williamr@2
|
1428 |
IMPORT_C SSL_METHOD *TLSv1_server_method(void); /* TLSv1.0 */
|
williamr@2
|
1429 |
IMPORT_C SSL_METHOD *TLSv1_client_method(void); /* TLSv1.0 */
|
williamr@2
|
1430 |
|
williamr@2
|
1431 |
IMPORT_C SSL_METHOD *DTLSv1_method(void); /* DTLSv1.0 */
|
williamr@2
|
1432 |
IMPORT_C SSL_METHOD *DTLSv1_server_method(void); /* DTLSv1.0 */
|
williamr@2
|
1433 |
IMPORT_C SSL_METHOD *DTLSv1_client_method(void); /* DTLSv1.0 */
|
williamr@2
|
1434 |
|
williamr@2
|
1435 |
IMPORT_C STACK_OF(SSL_CIPHER) *SSL_get_ciphers(const SSL *s);
|
williamr@2
|
1436 |
|
williamr@2
|
1437 |
IMPORT_C int SSL_do_handshake(SSL *s);
|
williamr@2
|
1438 |
IMPORT_C int SSL_renegotiate(SSL *s);
|
williamr@2
|
1439 |
IMPORT_C int SSL_renegotiate_pending(SSL *s);
|
williamr@2
|
1440 |
IMPORT_C int SSL_shutdown(SSL *s);
|
williamr@2
|
1441 |
|
williamr@2
|
1442 |
IMPORT_C SSL_METHOD *SSL_get_ssl_method(SSL *s);
|
williamr@2
|
1443 |
IMPORT_C int SSL_set_ssl_method(SSL *s,SSL_METHOD *method);
|
williamr@2
|
1444 |
IMPORT_C const char *SSL_alert_type_string_long(int value);
|
williamr@2
|
1445 |
IMPORT_C const char *SSL_alert_type_string(int value);
|
williamr@2
|
1446 |
IMPORT_C const char *SSL_alert_desc_string_long(int value);
|
williamr@2
|
1447 |
IMPORT_C const char *SSL_alert_desc_string(int value);
|
williamr@2
|
1448 |
|
williamr@2
|
1449 |
IMPORT_C void SSL_set_client_CA_list(SSL *s, STACK_OF(X509_NAME) *name_list);
|
williamr@2
|
1450 |
IMPORT_C void SSL_CTX_set_client_CA_list(SSL_CTX *ctx, STACK_OF(X509_NAME) *name_list);
|
williamr@2
|
1451 |
IMPORT_C STACK_OF(X509_NAME) *SSL_get_client_CA_list(const SSL *s);
|
williamr@2
|
1452 |
IMPORT_C STACK_OF(X509_NAME) *SSL_CTX_get_client_CA_list(const SSL_CTX *s);
|
williamr@2
|
1453 |
IMPORT_C int SSL_add_client_CA(SSL *ssl,X509 *x);
|
williamr@2
|
1454 |
IMPORT_C int SSL_CTX_add_client_CA(SSL_CTX *ctx,X509 *x);
|
williamr@2
|
1455 |
|
williamr@2
|
1456 |
IMPORT_C void SSL_set_connect_state(SSL *s);
|
williamr@2
|
1457 |
IMPORT_C void SSL_set_accept_state(SSL *s);
|
williamr@2
|
1458 |
|
williamr@2
|
1459 |
IMPORT_C long SSL_get_default_timeout(const SSL *s);
|
williamr@2
|
1460 |
|
williamr@2
|
1461 |
IMPORT_C int SSL_library_init(void );
|
williamr@2
|
1462 |
|
williamr@2
|
1463 |
IMPORT_C char *SSL_CIPHER_description(SSL_CIPHER *,char *buf,int size);
|
williamr@2
|
1464 |
IMPORT_C STACK_OF(X509_NAME) *SSL_dup_CA_list(STACK_OF(X509_NAME) *sk);
|
williamr@2
|
1465 |
|
williamr@2
|
1466 |
IMPORT_C SSL *SSL_dup(SSL *ssl);
|
williamr@2
|
1467 |
|
williamr@2
|
1468 |
IMPORT_C X509 *SSL_get_certificate(const SSL *ssl);
|
williamr@2
|
1469 |
IMPORT_C /* EVP_PKEY */ struct evp_pkey_st *SSL_get_privatekey(SSL *ssl);
|
williamr@2
|
1470 |
|
williamr@2
|
1471 |
IMPORT_C void SSL_CTX_set_quiet_shutdown(SSL_CTX *ctx,int mode);
|
williamr@2
|
1472 |
IMPORT_C int SSL_CTX_get_quiet_shutdown(const SSL_CTX *ctx);
|
williamr@2
|
1473 |
IMPORT_C void SSL_set_quiet_shutdown(SSL *ssl,int mode);
|
williamr@2
|
1474 |
IMPORT_C int SSL_get_quiet_shutdown(const SSL *ssl);
|
williamr@2
|
1475 |
IMPORT_C void SSL_set_shutdown(SSL *ssl,int mode);
|
williamr@2
|
1476 |
IMPORT_C int SSL_get_shutdown(const SSL *ssl);
|
williamr@2
|
1477 |
IMPORT_C int SSL_version(const SSL *ssl);
|
williamr@2
|
1478 |
IMPORT_C int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
|
williamr@2
|
1479 |
IMPORT_C int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
|
williamr@2
|
1480 |
const char *CApath);
|
williamr@2
|
1481 |
#define SSL_get0_session SSL_get_session /* just peek at pointer */
|
williamr@2
|
1482 |
IMPORT_C SSL_SESSION *SSL_get_session(const SSL *ssl);
|
williamr@2
|
1483 |
IMPORT_C SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
|
williamr@2
|
1484 |
IMPORT_C SSL_CTX *SSL_get_SSL_CTX(const SSL *ssl);
|
williamr@2
|
1485 |
IMPORT_C SSL_CTX *SSL_set_SSL_CTX(SSL *ssl, SSL_CTX* ctx);
|
williamr@2
|
1486 |
IMPORT_C void SSL_set_info_callback(SSL *ssl,
|
williamr@2
|
1487 |
void (*cb)(const SSL *ssl,int type,int val));
|
williamr@2
|
1488 |
IMPORT_C void (*SSL_get_info_callback(const SSL *ssl))(const SSL *ssl,int type,int val);
|
williamr@2
|
1489 |
IMPORT_C int SSL_state(const SSL *ssl);
|
williamr@2
|
1490 |
|
williamr@2
|
1491 |
IMPORT_C void SSL_set_verify_result(SSL *ssl,long v);
|
williamr@2
|
1492 |
IMPORT_C long SSL_get_verify_result(const SSL *ssl);
|
williamr@2
|
1493 |
|
williamr@2
|
1494 |
IMPORT_C int SSL_set_ex_data(SSL *ssl,int idx,void *data);
|
williamr@2
|
1495 |
IMPORT_C void *SSL_get_ex_data(const SSL *ssl,int idx);
|
williamr@2
|
1496 |
IMPORT_C int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
|
williamr@2
|
1497 |
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
|
williamr@2
|
1498 |
|
williamr@2
|
1499 |
IMPORT_C int SSL_SESSION_set_ex_data(SSL_SESSION *ss,int idx,void *data);
|
williamr@2
|
1500 |
IMPORT_C void *SSL_SESSION_get_ex_data(const SSL_SESSION *ss,int idx);
|
williamr@2
|
1501 |
IMPORT_C int SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
|
williamr@2
|
1502 |
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
|
williamr@2
|
1503 |
|
williamr@2
|
1504 |
IMPORT_C int SSL_CTX_set_ex_data(SSL_CTX *ssl,int idx,void *data);
|
williamr@2
|
1505 |
IMPORT_C void *SSL_CTX_get_ex_data(const SSL_CTX *ssl,int idx);
|
williamr@2
|
1506 |
IMPORT_C int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func,
|
williamr@2
|
1507 |
CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func);
|
williamr@2
|
1508 |
|
williamr@2
|
1509 |
IMPORT_C int SSL_get_ex_data_X509_STORE_CTX_idx(void );
|
williamr@2
|
1510 |
|
williamr@2
|
1511 |
#define SSL_CTX_sess_set_cache_size(ctx,t) \
|
williamr@2
|
1512 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_SIZE,t,NULL)
|
williamr@2
|
1513 |
#define SSL_CTX_sess_get_cache_size(ctx) \
|
williamr@2
|
1514 |
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_SIZE,0,NULL)
|
williamr@2
|
1515 |
#define SSL_CTX_set_session_cache_mode(ctx,m) \
|
williamr@2
|
1516 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_SESS_CACHE_MODE,m,NULL)
|
williamr@2
|
1517 |
#define SSL_CTX_get_session_cache_mode(ctx) \
|
williamr@2
|
1518 |
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_SESS_CACHE_MODE,0,NULL)
|
williamr@2
|
1519 |
|
williamr@2
|
1520 |
#define SSL_CTX_get_default_read_ahead(ctx) SSL_CTX_get_read_ahead(ctx)
|
williamr@2
|
1521 |
#define SSL_CTX_set_default_read_ahead(ctx,m) SSL_CTX_set_read_ahead(ctx,m)
|
williamr@2
|
1522 |
#define SSL_CTX_get_read_ahead(ctx) \
|
williamr@2
|
1523 |
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_READ_AHEAD,0,NULL)
|
williamr@2
|
1524 |
#define SSL_CTX_set_read_ahead(ctx,m) \
|
williamr@2
|
1525 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_READ_AHEAD,m,NULL)
|
williamr@2
|
1526 |
#define SSL_CTX_get_max_cert_list(ctx) \
|
williamr@2
|
1527 |
SSL_CTX_ctrl(ctx,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
|
williamr@2
|
1528 |
#define SSL_CTX_set_max_cert_list(ctx,m) \
|
williamr@2
|
1529 |
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
|
williamr@2
|
1530 |
#define SSL_get_max_cert_list(ssl) \
|
williamr@2
|
1531 |
SSL_ctrl(ssl,SSL_CTRL_GET_MAX_CERT_LIST,0,NULL)
|
williamr@2
|
1532 |
#define SSL_set_max_cert_list(ssl,m) \
|
williamr@2
|
1533 |
SSL_ctrl(ssl,SSL_CTRL_SET_MAX_CERT_LIST,m,NULL)
|
williamr@2
|
1534 |
|
williamr@2
|
1535 |
/* NB: the keylength is only applicable when is_export is true */
|
williamr@2
|
1536 |
#ifndef OPENSSL_NO_RSA
|
williamr@2
|
1537 |
IMPORT_C void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
|
williamr@2
|
1538 |
RSA *(*cb)(SSL *ssl,int is_export,
|
williamr@2
|
1539 |
int keylength));
|
williamr@2
|
1540 |
|
williamr@2
|
1541 |
IMPORT_C void SSL_set_tmp_rsa_callback(SSL *ssl,
|
williamr@2
|
1542 |
RSA *(*cb)(SSL *ssl,int is_export,
|
williamr@2
|
1543 |
int keylength));
|
williamr@2
|
1544 |
#endif
|
williamr@2
|
1545 |
#ifndef OPENSSL_NO_DH
|
williamr@2
|
1546 |
IMPORT_C void SSL_CTX_set_tmp_dh_callback(SSL_CTX *ctx,
|
williamr@2
|
1547 |
DH *(*dh)(SSL *ssl,int is_export,
|
williamr@2
|
1548 |
int keylength));
|
williamr@2
|
1549 |
IMPORT_C void SSL_set_tmp_dh_callback(SSL *ssl,
|
williamr@2
|
1550 |
DH *(*dh)(SSL *ssl,int is_export,
|
williamr@2
|
1551 |
int keylength));
|
williamr@2
|
1552 |
#endif
|
williamr@2
|
1553 |
#ifndef OPENSSL_NO_ECDH
|
williamr@2
|
1554 |
IMPORT_C void SSL_CTX_set_tmp_ecdh_callback(SSL_CTX *ctx,
|
williamr@2
|
1555 |
EC_KEY *(*ecdh)(SSL *ssl,int is_export,
|
williamr@2
|
1556 |
int keylength));
|
williamr@2
|
1557 |
IMPORT_C void SSL_set_tmp_ecdh_callback(SSL *ssl,
|
williamr@2
|
1558 |
EC_KEY *(*ecdh)(SSL *ssl,int is_export,
|
williamr@2
|
1559 |
int keylength));
|
williamr@2
|
1560 |
#endif
|
williamr@2
|
1561 |
|
williamr@2
|
1562 |
#ifndef OPENSSL_NO_COMP
|
williamr@2
|
1563 |
IMPORT_C const COMP_METHOD *SSL_get_current_compression(SSL *s);
|
williamr@2
|
1564 |
IMPORT_C const COMP_METHOD *SSL_get_current_expansion(SSL *s);
|
williamr@2
|
1565 |
IMPORT_C const char *SSL_COMP_get_name(const COMP_METHOD *comp);
|
williamr@2
|
1566 |
IMPORT_C STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
|
williamr@2
|
1567 |
IMPORT_C int SSL_COMP_add_compression_method(int id,COMP_METHOD *cm);
|
williamr@2
|
1568 |
#else
|
williamr@2
|
1569 |
IMPORT_C const void *SSL_get_current_compression(SSL *s);
|
williamr@2
|
1570 |
IMPORT_C const void *SSL_get_current_expansion(SSL *s);
|
williamr@2
|
1571 |
IMPORT_C const char *SSL_COMP_get_name(const void *comp);
|
williamr@2
|
1572 |
IMPORT_C void *SSL_COMP_get_compression_methods(void);
|
williamr@2
|
1573 |
IMPORT_C int SSL_COMP_add_compression_method(int id,void *cm);
|
williamr@2
|
1574 |
#endif
|
williamr@2
|
1575 |
|
williamr@2
|
1576 |
/* BEGIN ERROR CODES */
|
williamr@2
|
1577 |
/* The following lines are auto generated by the script mkerr.pl. Any changes
|
williamr@2
|
1578 |
* made after this point may be overwritten when the script is next run.
|
williamr@2
|
1579 |
*/
|
williamr@2
|
1580 |
IMPORT_C void ERR_load_SSL_strings(void);
|
williamr@2
|
1581 |
|
williamr@2
|
1582 |
/* Error codes for the SSL functions. */
|
williamr@2
|
1583 |
|
williamr@2
|
1584 |
/* Function codes. */
|
williamr@2
|
1585 |
#define SSL_F_CLIENT_CERTIFICATE 100
|
williamr@2
|
1586 |
#define SSL_F_CLIENT_FINISHED 167
|
williamr@2
|
1587 |
#define SSL_F_CLIENT_HELLO 101
|
williamr@2
|
1588 |
#define SSL_F_CLIENT_MASTER_KEY 102
|
williamr@2
|
1589 |
#define SSL_F_D2I_SSL_SESSION 103
|
williamr@2
|
1590 |
#define SSL_F_DO_DTLS1_WRITE 245
|
williamr@2
|
1591 |
#define SSL_F_DO_SSL3_WRITE 104
|
williamr@2
|
1592 |
#define SSL_F_DTLS1_ACCEPT 246
|
williamr@2
|
1593 |
#define SSL_F_DTLS1_BUFFER_RECORD 247
|
williamr@2
|
1594 |
#define SSL_F_DTLS1_CLIENT_HELLO 248
|
williamr@2
|
1595 |
#define SSL_F_DTLS1_CONNECT 249
|
williamr@2
|
1596 |
#define SSL_F_DTLS1_ENC 250
|
williamr@2
|
1597 |
#define SSL_F_DTLS1_GET_HELLO_VERIFY 251
|
williamr@2
|
1598 |
#define SSL_F_DTLS1_GET_MESSAGE 252
|
williamr@2
|
1599 |
#define SSL_F_DTLS1_GET_MESSAGE_FRAGMENT 253
|
williamr@2
|
1600 |
#define SSL_F_DTLS1_GET_RECORD 254
|
williamr@2
|
1601 |
#define SSL_F_DTLS1_OUTPUT_CERT_CHAIN 255
|
williamr@2
|
1602 |
#define SSL_F_DTLS1_PREPROCESS_FRAGMENT 277
|
williamr@2
|
1603 |
#define SSL_F_DTLS1_PROCESS_OUT_OF_SEQ_MESSAGE 256
|
williamr@2
|
1604 |
#define SSL_F_DTLS1_PROCESS_RECORD 257
|
williamr@2
|
1605 |
#define SSL_F_DTLS1_READ_BYTES 258
|
williamr@2
|
1606 |
#define SSL_F_DTLS1_READ_FAILED 259
|
williamr@2
|
1607 |
#define SSL_F_DTLS1_SEND_CERTIFICATE_REQUEST 260
|
williamr@2
|
1608 |
#define SSL_F_DTLS1_SEND_CLIENT_CERTIFICATE 261
|
williamr@2
|
1609 |
#define SSL_F_DTLS1_SEND_CLIENT_KEY_EXCHANGE 262
|
williamr@2
|
1610 |
#define SSL_F_DTLS1_SEND_CLIENT_VERIFY 263
|
williamr@2
|
1611 |
#define SSL_F_DTLS1_SEND_HELLO_VERIFY_REQUEST 264
|
williamr@2
|
1612 |
#define SSL_F_DTLS1_SEND_SERVER_CERTIFICATE 265
|
williamr@2
|
1613 |
#define SSL_F_DTLS1_SEND_SERVER_HELLO 266
|
williamr@2
|
1614 |
#define SSL_F_DTLS1_SEND_SERVER_KEY_EXCHANGE 267
|
williamr@2
|
1615 |
#define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268
|
williamr@2
|
1616 |
#define SSL_F_GET_CLIENT_FINISHED 105
|
williamr@2
|
1617 |
#define SSL_F_GET_CLIENT_HELLO 106
|
williamr@2
|
1618 |
#define SSL_F_GET_CLIENT_MASTER_KEY 107
|
williamr@2
|
1619 |
#define SSL_F_GET_SERVER_FINISHED 108
|
williamr@2
|
1620 |
#define SSL_F_GET_SERVER_HELLO 109
|
williamr@2
|
1621 |
#define SSL_F_GET_SERVER_VERIFY 110
|
williamr@2
|
1622 |
#define SSL_F_I2D_SSL_SESSION 111
|
williamr@2
|
1623 |
#define SSL_F_READ_N 112
|
williamr@2
|
1624 |
#define SSL_F_REQUEST_CERTIFICATE 113
|
williamr@2
|
1625 |
#define SSL_F_SERVER_FINISH 239
|
williamr@2
|
1626 |
#define SSL_F_SERVER_HELLO 114
|
williamr@2
|
1627 |
#define SSL_F_SERVER_VERIFY 240
|
williamr@2
|
1628 |
#define SSL_F_SSL23_ACCEPT 115
|
williamr@2
|
1629 |
#define SSL_F_SSL23_CLIENT_HELLO 116
|
williamr@2
|
1630 |
#define SSL_F_SSL23_CONNECT 117
|
williamr@2
|
1631 |
#define SSL_F_SSL23_GET_CLIENT_HELLO 118
|
williamr@2
|
1632 |
#define SSL_F_SSL23_GET_SERVER_HELLO 119
|
williamr@2
|
1633 |
#define SSL_F_SSL23_PEEK 237
|
williamr@2
|
1634 |
#define SSL_F_SSL23_READ 120
|
williamr@2
|
1635 |
#define SSL_F_SSL23_WRITE 121
|
williamr@2
|
1636 |
#define SSL_F_SSL2_ACCEPT 122
|
williamr@2
|
1637 |
#define SSL_F_SSL2_CONNECT 123
|
williamr@2
|
1638 |
#define SSL_F_SSL2_ENC_INIT 124
|
williamr@2
|
1639 |
#define SSL_F_SSL2_GENERATE_KEY_MATERIAL 241
|
williamr@2
|
1640 |
#define SSL_F_SSL2_PEEK 234
|
williamr@2
|
1641 |
#define SSL_F_SSL2_READ 125
|
williamr@2
|
1642 |
#define SSL_F_SSL2_READ_INTERNAL 236
|
williamr@2
|
1643 |
#define SSL_F_SSL2_SET_CERTIFICATE 126
|
williamr@2
|
1644 |
#define SSL_F_SSL2_WRITE 127
|
williamr@2
|
1645 |
#define SSL_F_SSL3_ACCEPT 128
|
williamr@2
|
1646 |
#define SSL_F_SSL3_CALLBACK_CTRL 233
|
williamr@2
|
1647 |
#define SSL_F_SSL3_CHANGE_CIPHER_STATE 129
|
williamr@2
|
1648 |
#define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130
|
williamr@2
|
1649 |
#define SSL_F_SSL3_CLIENT_HELLO 131
|
williamr@2
|
1650 |
#define SSL_F_SSL3_CONNECT 132
|
williamr@2
|
1651 |
#define SSL_F_SSL3_CTRL 213
|
williamr@2
|
1652 |
#define SSL_F_SSL3_CTX_CTRL 133
|
williamr@2
|
1653 |
#define SSL_F_SSL3_ENC 134
|
williamr@2
|
1654 |
#define SSL_F_SSL3_GENERATE_KEY_BLOCK 238
|
williamr@2
|
1655 |
#define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135
|
williamr@2
|
1656 |
#define SSL_F_SSL3_GET_CERT_VERIFY 136
|
williamr@2
|
1657 |
#define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137
|
williamr@2
|
1658 |
#define SSL_F_SSL3_GET_CLIENT_HELLO 138
|
williamr@2
|
1659 |
#define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE 139
|
williamr@2
|
1660 |
#define SSL_F_SSL3_GET_FINISHED 140
|
williamr@2
|
1661 |
#define SSL_F_SSL3_GET_KEY_EXCHANGE 141
|
williamr@2
|
1662 |
#define SSL_F_SSL3_GET_MESSAGE 142
|
williamr@2
|
1663 |
#define SSL_F_SSL3_GET_NEW_SESSION_TICKET 283
|
williamr@2
|
1664 |
#define SSL_F_SSL3_GET_RECORD 143
|
williamr@2
|
1665 |
#define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144
|
williamr@2
|
1666 |
#define SSL_F_SSL3_GET_SERVER_DONE 145
|
williamr@2
|
1667 |
#define SSL_F_SSL3_GET_SERVER_HELLO 146
|
williamr@2
|
1668 |
#define SSL_F_SSL3_NEW_SESSION_TICKET 284
|
williamr@2
|
1669 |
#define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147
|
williamr@2
|
1670 |
#define SSL_F_SSL3_PEEK 235
|
williamr@2
|
1671 |
#define SSL_F_SSL3_READ_BYTES 148
|
williamr@2
|
1672 |
#define SSL_F_SSL3_READ_N 149
|
williamr@2
|
1673 |
#define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST 150
|
williamr@2
|
1674 |
#define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE 151
|
williamr@2
|
1675 |
#define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152
|
williamr@2
|
1676 |
#define SSL_F_SSL3_SEND_CLIENT_VERIFY 153
|
williamr@2
|
1677 |
#define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154
|
williamr@2
|
1678 |
#define SSL_F_SSL3_SEND_SERVER_HELLO 242
|
williamr@2
|
1679 |
#define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155
|
williamr@2
|
1680 |
#define SSL_F_SSL3_SETUP_BUFFERS 156
|
williamr@2
|
1681 |
#define SSL_F_SSL3_SETUP_KEY_BLOCK 157
|
williamr@2
|
1682 |
#define SSL_F_SSL3_WRITE_BYTES 158
|
williamr@2
|
1683 |
#define SSL_F_SSL3_WRITE_PENDING 159
|
williamr@2
|
1684 |
#define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 272
|
williamr@2
|
1685 |
#define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215
|
williamr@2
|
1686 |
#define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216
|
williamr@2
|
1687 |
#define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 273
|
williamr@2
|
1688 |
#define SSL_F_SSL_BAD_METHOD 160
|
williamr@2
|
1689 |
#define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161
|
williamr@2
|
1690 |
#define SSL_F_SSL_CERT_DUP 221
|
williamr@2
|
1691 |
#define SSL_F_SSL_CERT_INST 222
|
williamr@2
|
1692 |
#define SSL_F_SSL_CERT_INSTANTIATE 214
|
williamr@2
|
1693 |
#define SSL_F_SSL_CERT_NEW 162
|
williamr@2
|
1694 |
#define SSL_F_SSL_CHECK_PRIVATE_KEY 163
|
williamr@2
|
1695 |
#define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 274
|
williamr@2
|
1696 |
#define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230
|
williamr@2
|
1697 |
#define SSL_F_SSL_CIPHER_STRENGTH_SORT 231
|
williamr@2
|
1698 |
#define SSL_F_SSL_CLEAR 164
|
williamr@2
|
1699 |
#define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165
|
williamr@2
|
1700 |
#define SSL_F_SSL_CREATE_CIPHER_LIST 166
|
williamr@2
|
1701 |
#define SSL_F_SSL_CTRL 232
|
williamr@2
|
1702 |
#define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168
|
williamr@2
|
1703 |
#define SSL_F_SSL_CTX_NEW 169
|
williamr@2
|
1704 |
#define SSL_F_SSL_CTX_SET_CIPHER_LIST 269
|
williamr@2
|
1705 |
#define SSL_F_SSL_CTX_SET_PURPOSE 226
|
williamr@2
|
1706 |
#define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219
|
williamr@2
|
1707 |
#define SSL_F_SSL_CTX_SET_SSL_VERSION 170
|
williamr@2
|
1708 |
#define SSL_F_SSL_CTX_SET_TRUST 229
|
williamr@2
|
1709 |
#define SSL_F_SSL_CTX_USE_CERTIFICATE 171
|
williamr@2
|
1710 |
#define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172
|
williamr@2
|
1711 |
#define SSL_F_SSL_CTX_USE_CERTIFICATE_CHAIN_FILE 220
|
williamr@2
|
1712 |
#define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173
|
williamr@2
|
1713 |
#define SSL_F_SSL_CTX_USE_PRIVATEKEY 174
|
williamr@2
|
1714 |
#define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175
|
williamr@2
|
1715 |
#define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176
|
williamr@2
|
1716 |
#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177
|
williamr@2
|
1717 |
#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178
|
williamr@2
|
1718 |
#define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179
|
williamr@2
|
1719 |
#define SSL_F_SSL_DO_HANDSHAKE 180
|
williamr@2
|
1720 |
#define SSL_F_SSL_GET_NEW_SESSION 181
|
williamr@2
|
1721 |
#define SSL_F_SSL_GET_PREV_SESSION 217
|
williamr@2
|
1722 |
#define SSL_F_SSL_GET_SERVER_SEND_CERT 182
|
williamr@2
|
1723 |
#define SSL_F_SSL_GET_SIGN_PKEY 183
|
williamr@2
|
1724 |
#define SSL_F_SSL_INIT_WBIO_BUFFER 184
|
williamr@2
|
1725 |
#define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185
|
williamr@2
|
1726 |
#define SSL_F_SSL_NEW 186
|
williamr@2
|
1727 |
#define SSL_F_SSL_PEEK 270
|
williamr@2
|
1728 |
#define SSL_F_SSL_PREPARE_CLIENTHELLO_TLSEXT 275
|
williamr@2
|
1729 |
#define SSL_F_SSL_PREPARE_SERVERHELLO_TLSEXT 276
|
williamr@2
|
1730 |
#define SSL_F_SSL_READ 223
|
williamr@2
|
1731 |
#define SSL_F_SSL_RSA_PRIVATE_DECRYPT 187
|
williamr@2
|
1732 |
#define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 188
|
williamr@2
|
1733 |
#define SSL_F_SSL_SESSION_NEW 189
|
williamr@2
|
1734 |
#define SSL_F_SSL_SESSION_PRINT_FP 190
|
williamr@2
|
1735 |
#define SSL_F_SSL_SESS_CERT_NEW 225
|
williamr@2
|
1736 |
#define SSL_F_SSL_SET_CERT 191
|
williamr@2
|
1737 |
#define SSL_F_SSL_SET_CIPHER_LIST 271
|
williamr@2
|
1738 |
#define SSL_F_SSL_SET_FD 192
|
williamr@2
|
1739 |
#define SSL_F_SSL_SET_PKEY 193
|
williamr@2
|
1740 |
#define SSL_F_SSL_SET_PURPOSE 227
|
williamr@2
|
1741 |
#define SSL_F_SSL_SET_RFD 194
|
williamr@2
|
1742 |
#define SSL_F_SSL_SET_SESSION 195
|
williamr@2
|
1743 |
#define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218
|
williamr@2
|
1744 |
#define SSL_F_SSL_SET_TRUST 228
|
williamr@2
|
1745 |
#define SSL_F_SSL_SET_WFD 196
|
williamr@2
|
1746 |
#define SSL_F_SSL_SHUTDOWN 224
|
williamr@2
|
1747 |
#define SSL_F_SSL_UNDEFINED_CONST_FUNCTION 243
|
williamr@2
|
1748 |
#define SSL_F_SSL_UNDEFINED_FUNCTION 197
|
williamr@2
|
1749 |
#define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244
|
williamr@2
|
1750 |
#define SSL_F_SSL_USE_CERTIFICATE 198
|
williamr@2
|
1751 |
#define SSL_F_SSL_USE_CERTIFICATE_ASN1 199
|
williamr@2
|
1752 |
#define SSL_F_SSL_USE_CERTIFICATE_FILE 200
|
williamr@2
|
1753 |
#define SSL_F_SSL_USE_PRIVATEKEY 201
|
williamr@2
|
1754 |
#define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202
|
williamr@2
|
1755 |
#define SSL_F_SSL_USE_PRIVATEKEY_FILE 203
|
williamr@2
|
1756 |
#define SSL_F_SSL_USE_RSAPRIVATEKEY 204
|
williamr@2
|
1757 |
#define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205
|
williamr@2
|
1758 |
#define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206
|
williamr@2
|
1759 |
#define SSL_F_SSL_VERIFY_CERT_CHAIN 207
|
williamr@2
|
1760 |
#define SSL_F_SSL_WRITE 208
|
williamr@2
|
1761 |
#define SSL_F_TLS1_CHANGE_CIPHER_STATE 209
|
williamr@2
|
1762 |
#define SSL_F_TLS1_ENC 210
|
williamr@2
|
1763 |
#define SSL_F_TLS1_SETUP_KEY_BLOCK 211
|
williamr@2
|
1764 |
#define SSL_F_WRITE_PENDING 212
|
williamr@2
|
1765 |
|
williamr@2
|
1766 |
/* Reason codes. */
|
williamr@2
|
1767 |
#define SSL_R_APP_DATA_IN_HANDSHAKE 100
|
williamr@2
|
1768 |
#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
|
williamr@2
|
1769 |
#define SSL_R_BAD_ALERT_RECORD 101
|
williamr@2
|
1770 |
#define SSL_R_BAD_AUTHENTICATION_TYPE 102
|
williamr@2
|
1771 |
#define SSL_R_BAD_CHANGE_CIPHER_SPEC 103
|
williamr@2
|
1772 |
#define SSL_R_BAD_CHECKSUM 104
|
williamr@2
|
1773 |
#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106
|
williamr@2
|
1774 |
#define SSL_R_BAD_DECOMPRESSION 107
|
williamr@2
|
1775 |
#define SSL_R_BAD_DH_G_LENGTH 108
|
williamr@2
|
1776 |
#define SSL_R_BAD_DH_PUB_KEY_LENGTH 109
|
williamr@2
|
1777 |
#define SSL_R_BAD_DH_P_LENGTH 110
|
williamr@2
|
1778 |
#define SSL_R_BAD_DIGEST_LENGTH 111
|
williamr@2
|
1779 |
#define SSL_R_BAD_DSA_SIGNATURE 112
|
williamr@2
|
1780 |
#define SSL_R_BAD_ECC_CERT 304
|
williamr@2
|
1781 |
#define SSL_R_BAD_ECDSA_SIGNATURE 305
|
williamr@2
|
1782 |
#define SSL_R_BAD_ECPOINT 306
|
williamr@2
|
1783 |
#define SSL_R_BAD_HELLO_REQUEST 105
|
williamr@2
|
1784 |
#define SSL_R_BAD_LENGTH 271
|
williamr@2
|
1785 |
#define SSL_R_BAD_MAC_DECODE 113
|
williamr@2
|
1786 |
#define SSL_R_BAD_MESSAGE_TYPE 114
|
williamr@2
|
1787 |
#define SSL_R_BAD_PACKET_LENGTH 115
|
williamr@2
|
1788 |
#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116
|
williamr@2
|
1789 |
#define SSL_R_BAD_RESPONSE_ARGUMENT 117
|
williamr@2
|
1790 |
#define SSL_R_BAD_RSA_DECRYPT 118
|
williamr@2
|
1791 |
#define SSL_R_BAD_RSA_ENCRYPT 119
|
williamr@2
|
1792 |
#define SSL_R_BAD_RSA_E_LENGTH 120
|
williamr@2
|
1793 |
#define SSL_R_BAD_RSA_MODULUS_LENGTH 121
|
williamr@2
|
1794 |
#define SSL_R_BAD_RSA_SIGNATURE 122
|
williamr@2
|
1795 |
#define SSL_R_BAD_SIGNATURE 123
|
williamr@2
|
1796 |
#define SSL_R_BAD_SSL_FILETYPE 124
|
williamr@2
|
1797 |
#define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125
|
williamr@2
|
1798 |
#define SSL_R_BAD_STATE 126
|
williamr@2
|
1799 |
#define SSL_R_BAD_WRITE_RETRY 127
|
williamr@2
|
1800 |
#define SSL_R_BIO_NOT_SET 128
|
williamr@2
|
1801 |
#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129
|
williamr@2
|
1802 |
#define SSL_R_BN_LIB 130
|
williamr@2
|
1803 |
#define SSL_R_CA_DN_LENGTH_MISMATCH 131
|
williamr@2
|
1804 |
#define SSL_R_CA_DN_TOO_LONG 132
|
williamr@2
|
1805 |
#define SSL_R_CCS_RECEIVED_EARLY 133
|
williamr@2
|
1806 |
#define SSL_R_CERTIFICATE_VERIFY_FAILED 134
|
williamr@2
|
1807 |
#define SSL_R_CERT_LENGTH_MISMATCH 135
|
williamr@2
|
1808 |
#define SSL_R_CHALLENGE_IS_DIFFERENT 136
|
williamr@2
|
1809 |
#define SSL_R_CIPHER_CODE_WRONG_LENGTH 137
|
williamr@2
|
1810 |
#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138
|
williamr@2
|
1811 |
#define SSL_R_CIPHER_TABLE_SRC_ERROR 139
|
williamr@2
|
1812 |
#define SSL_R_CLIENTHELLO_TLSEXT 157
|
williamr@2
|
1813 |
#define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140
|
williamr@2
|
1814 |
#define SSL_R_COMPRESSION_FAILURE 141
|
williamr@2
|
1815 |
#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE 307
|
williamr@2
|
1816 |
#define SSL_R_COMPRESSION_LIBRARY_ERROR 142
|
williamr@2
|
1817 |
#define SSL_R_CONNECTION_ID_IS_DIFFERENT 143
|
williamr@2
|
1818 |
#define SSL_R_CONNECTION_TYPE_NOT_SET 144
|
williamr@2
|
1819 |
#define SSL_R_COOKIE_MISMATCH 308
|
williamr@2
|
1820 |
#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 145
|
williamr@2
|
1821 |
#define SSL_R_DATA_LENGTH_TOO_LONG 146
|
williamr@2
|
1822 |
#define SSL_R_DECRYPTION_FAILED 147
|
williamr@2
|
1823 |
#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC 281
|
williamr@2
|
1824 |
#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 148
|
williamr@2
|
1825 |
#define SSL_R_DIGEST_CHECK_FAILED 149
|
williamr@2
|
1826 |
#define SSL_R_DUPLICATE_COMPRESSION_ID 309
|
williamr@2
|
1827 |
#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER 310
|
williamr@2
|
1828 |
#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 150
|
williamr@2
|
1829 |
#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY 282
|
williamr@2
|
1830 |
#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 151
|
williamr@2
|
1831 |
#define SSL_R_EXCESSIVE_MESSAGE_SIZE 152
|
williamr@2
|
1832 |
#define SSL_R_EXTRA_DATA_IN_MESSAGE 153
|
williamr@2
|
1833 |
#define SSL_R_GOT_A_FIN_BEFORE_A_CCS 154
|
williamr@2
|
1834 |
#define SSL_R_HTTPS_PROXY_REQUEST 155
|
williamr@2
|
1835 |
#define SSL_R_HTTP_REQUEST 156
|
williamr@2
|
1836 |
#define SSL_R_ILLEGAL_PADDING 283
|
williamr@2
|
1837 |
#define SSL_R_INVALID_CHALLENGE_LENGTH 158
|
williamr@2
|
1838 |
#define SSL_R_INVALID_COMMAND 280
|
williamr@2
|
1839 |
#define SSL_R_INVALID_PURPOSE 278
|
williamr@2
|
1840 |
#define SSL_R_INVALID_TICKET_KEYS_LENGTH 275
|
williamr@2
|
1841 |
#define SSL_R_INVALID_TRUST 279
|
williamr@2
|
1842 |
#define SSL_R_KEY_ARG_TOO_LONG 284
|
williamr@2
|
1843 |
#define SSL_R_KRB5 285
|
williamr@2
|
1844 |
#define SSL_R_KRB5_C_CC_PRINC 286
|
williamr@2
|
1845 |
#define SSL_R_KRB5_C_GET_CRED 287
|
williamr@2
|
1846 |
#define SSL_R_KRB5_C_INIT 288
|
williamr@2
|
1847 |
#define SSL_R_KRB5_C_MK_REQ 289
|
williamr@2
|
1848 |
#define SSL_R_KRB5_S_BAD_TICKET 290
|
williamr@2
|
1849 |
#define SSL_R_KRB5_S_INIT 291
|
williamr@2
|
1850 |
#define SSL_R_KRB5_S_RD_REQ 292
|
williamr@2
|
1851 |
#define SSL_R_KRB5_S_TKT_EXPIRED 293
|
williamr@2
|
1852 |
#define SSL_R_KRB5_S_TKT_NYV 294
|
williamr@2
|
1853 |
#define SSL_R_KRB5_S_TKT_SKEW 295
|
williamr@2
|
1854 |
#define SSL_R_LENGTH_MISMATCH 159
|
williamr@2
|
1855 |
#define SSL_R_LENGTH_TOO_SHORT 160
|
williamr@2
|
1856 |
#define SSL_R_LIBRARY_BUG 274
|
williamr@2
|
1857 |
#define SSL_R_LIBRARY_HAS_NO_CIPHERS 161
|
williamr@2
|
1858 |
#define SSL_R_MESSAGE_TOO_LONG 296
|
williamr@2
|
1859 |
#define SSL_R_MISSING_DH_DSA_CERT 162
|
williamr@2
|
1860 |
#define SSL_R_MISSING_DH_KEY 163
|
williamr@2
|
1861 |
#define SSL_R_MISSING_DH_RSA_CERT 164
|
williamr@2
|
1862 |
#define SSL_R_MISSING_DSA_SIGNING_CERT 165
|
williamr@2
|
1863 |
#define SSL_R_MISSING_EXPORT_TMP_DH_KEY 166
|
williamr@2
|
1864 |
#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 167
|
williamr@2
|
1865 |
#define SSL_R_MISSING_RSA_CERTIFICATE 168
|
williamr@2
|
1866 |
#define SSL_R_MISSING_RSA_ENCRYPTING_CERT 169
|
williamr@2
|
1867 |
#define SSL_R_MISSING_RSA_SIGNING_CERT 170
|
williamr@2
|
1868 |
#define SSL_R_MISSING_TMP_DH_KEY 171
|
williamr@2
|
1869 |
#define SSL_R_MISSING_TMP_ECDH_KEY 311
|
williamr@2
|
1870 |
#define SSL_R_MISSING_TMP_RSA_KEY 172
|
williamr@2
|
1871 |
#define SSL_R_MISSING_TMP_RSA_PKEY 173
|
williamr@2
|
1872 |
#define SSL_R_MISSING_VERIFY_MESSAGE 174
|
williamr@2
|
1873 |
#define SSL_R_NON_SSLV2_INITIAL_PACKET 175
|
williamr@2
|
1874 |
#define SSL_R_NO_CERTIFICATES_RETURNED 176
|
williamr@2
|
1875 |
#define SSL_R_NO_CERTIFICATE_ASSIGNED 177
|
williamr@2
|
1876 |
#define SSL_R_NO_CERTIFICATE_RETURNED 178
|
williamr@2
|
1877 |
#define SSL_R_NO_CERTIFICATE_SET 179
|
williamr@2
|
1878 |
#define SSL_R_NO_CERTIFICATE_SPECIFIED 180
|
williamr@2
|
1879 |
#define SSL_R_NO_CIPHERS_AVAILABLE 181
|
williamr@2
|
1880 |
#define SSL_R_NO_CIPHERS_PASSED 182
|
williamr@2
|
1881 |
#define SSL_R_NO_CIPHERS_SPECIFIED 183
|
williamr@2
|
1882 |
#define SSL_R_NO_CIPHER_LIST 184
|
williamr@2
|
1883 |
#define SSL_R_NO_CIPHER_MATCH 185
|
williamr@2
|
1884 |
#define SSL_R_NO_CLIENT_CERT_RECEIVED 186
|
williamr@2
|
1885 |
#define SSL_R_NO_COMPRESSION_SPECIFIED 187
|
williamr@2
|
1886 |
#define SSL_R_NO_METHOD_SPECIFIED 188
|
williamr@2
|
1887 |
#define SSL_R_NO_PRIVATEKEY 189
|
williamr@2
|
1888 |
#define SSL_R_NO_PRIVATE_KEY_ASSIGNED 190
|
williamr@2
|
1889 |
#define SSL_R_NO_PROTOCOLS_AVAILABLE 191
|
williamr@2
|
1890 |
#define SSL_R_NO_PUBLICKEY 192
|
williamr@2
|
1891 |
#define SSL_R_NO_SHARED_CIPHER 193
|
williamr@2
|
1892 |
#define SSL_R_NO_VERIFY_CALLBACK 194
|
williamr@2
|
1893 |
#define SSL_R_NULL_SSL_CTX 195
|
williamr@2
|
1894 |
#define SSL_R_NULL_SSL_METHOD_PASSED 196
|
williamr@2
|
1895 |
#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197
|
williamr@2
|
1896 |
#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE 297
|
williamr@2
|
1897 |
#define SSL_R_PACKET_LENGTH_TOO_LONG 198
|
williamr@2
|
1898 |
#define SSL_R_PARSE_TLSEXT 223
|
williamr@2
|
1899 |
#define SSL_R_PATH_TOO_LONG 270
|
williamr@2
|
1900 |
#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 199
|
williamr@2
|
1901 |
#define SSL_R_PEER_ERROR 200
|
williamr@2
|
1902 |
#define SSL_R_PEER_ERROR_CERTIFICATE 201
|
williamr@2
|
1903 |
#define SSL_R_PEER_ERROR_NO_CERTIFICATE 202
|
williamr@2
|
1904 |
#define SSL_R_PEER_ERROR_NO_CIPHER 203
|
williamr@2
|
1905 |
#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 204
|
williamr@2
|
1906 |
#define SSL_R_PRE_MAC_LENGTH_TOO_LONG 205
|
williamr@2
|
1907 |
#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 206
|
williamr@2
|
1908 |
#define SSL_R_PROTOCOL_IS_SHUTDOWN 207
|
williamr@2
|
1909 |
#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 208
|
williamr@2
|
1910 |
#define SSL_R_PUBLIC_KEY_IS_NOT_RSA 209
|
williamr@2
|
1911 |
#define SSL_R_PUBLIC_KEY_NOT_RSA 210
|
williamr@2
|
1912 |
#define SSL_R_READ_BIO_NOT_SET 211
|
williamr@2
|
1913 |
#define SSL_R_READ_TIMEOUT_EXPIRED 312
|
williamr@2
|
1914 |
#define SSL_R_READ_WRONG_PACKET_TYPE 212
|
williamr@2
|
1915 |
#define SSL_R_RECORD_LENGTH_MISMATCH 213
|
williamr@2
|
1916 |
#define SSL_R_RECORD_TOO_LARGE 214
|
williamr@2
|
1917 |
#define SSL_R_RECORD_TOO_SMALL 298
|
williamr@2
|
1918 |
#define SSL_R_REQUIRED_CIPHER_MISSING 215
|
williamr@2
|
1919 |
#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 216
|
williamr@2
|
1920 |
#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 217
|
williamr@2
|
1921 |
#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 218
|
williamr@2
|
1922 |
#define SSL_R_SERVERHELLO_TLSEXT 224
|
williamr@2
|
1923 |
#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED 277
|
williamr@2
|
1924 |
#define SSL_R_SHORT_READ 219
|
williamr@2
|
1925 |
#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 220
|
williamr@2
|
1926 |
#define SSL_R_SSL23_DOING_SESSION_ID_REUSE 221
|
williamr@2
|
1927 |
#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG 299
|
williamr@2
|
1928 |
#define SSL_R_SSL3_EXT_INVALID_SERVERNAME 225
|
williamr@2
|
1929 |
#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE 226
|
williamr@2
|
1930 |
#define SSL_R_SSL3_SESSION_ID_TOO_LONG 300
|
williamr@2
|
1931 |
#define SSL_R_SSL3_SESSION_ID_TOO_SHORT 222
|
williamr@2
|
1932 |
#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042
|
williamr@2
|
1933 |
#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020
|
williamr@2
|
1934 |
#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045
|
williamr@2
|
1935 |
#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044
|
williamr@2
|
1936 |
#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046
|
williamr@2
|
1937 |
#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030
|
williamr@2
|
1938 |
#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040
|
williamr@2
|
1939 |
#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047
|
williamr@2
|
1940 |
#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041
|
williamr@2
|
1941 |
#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010
|
williamr@2
|
1942 |
#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043
|
williamr@2
|
1943 |
#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 228
|
williamr@2
|
1944 |
#define SSL_R_SSL_HANDSHAKE_FAILURE 229
|
williamr@2
|
1945 |
#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 230
|
williamr@2
|
1946 |
#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED 301
|
williamr@2
|
1947 |
#define SSL_R_SSL_SESSION_ID_CONFLICT 302
|
williamr@2
|
1948 |
#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG 273
|
williamr@2
|
1949 |
#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH 303
|
williamr@2
|
1950 |
#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 231
|
williamr@2
|
1951 |
#define SSL_R_TLSV1_ALERT_ACCESS_DENIED 1049
|
williamr@2
|
1952 |
#define SSL_R_TLSV1_ALERT_DECODE_ERROR 1050
|
williamr@2
|
1953 |
#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED 1021
|
williamr@2
|
1954 |
#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR 1051
|
williamr@2
|
1955 |
#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION 1060
|
williamr@2
|
1956 |
#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY 1071
|
williamr@2
|
1957 |
#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR 1080
|
williamr@2
|
1958 |
#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION 1100
|
williamr@2
|
1959 |
#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION 1070
|
williamr@2
|
1960 |
#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW 1022
|
williamr@2
|
1961 |
#define SSL_R_TLSV1_ALERT_UNKNOWN_CA 1048
|
williamr@2
|
1962 |
#define SSL_R_TLSV1_ALERT_USER_CANCELLED 1090
|
williamr@2
|
1963 |
#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 232
|
williamr@2
|
1964 |
#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 227
|
williamr@2
|
1965 |
#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
|
williamr@2
|
1966 |
#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 234
|
williamr@2
|
1967 |
#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 235
|
williamr@2
|
1968 |
#define SSL_R_UNABLE_TO_DECODE_DH_CERTS 236
|
williamr@2
|
1969 |
#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS 313
|
williamr@2
|
1970 |
#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 237
|
williamr@2
|
1971 |
#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 238
|
williamr@2
|
1972 |
#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS 314
|
williamr@2
|
1973 |
#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 239
|
williamr@2
|
1974 |
#define SSL_R_UNABLE_TO_FIND_SSL_METHOD 240
|
williamr@2
|
1975 |
#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 241
|
williamr@2
|
1976 |
#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 242
|
williamr@2
|
1977 |
#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 243
|
williamr@2
|
1978 |
#define SSL_R_UNEXPECTED_MESSAGE 244
|
williamr@2
|
1979 |
#define SSL_R_UNEXPECTED_RECORD 245
|
williamr@2
|
1980 |
#define SSL_R_UNINITIALIZED 276
|
williamr@2
|
1981 |
#define SSL_R_UNKNOWN_ALERT_TYPE 246
|
williamr@2
|
1982 |
#define SSL_R_UNKNOWN_CERTIFICATE_TYPE 247
|
williamr@2
|
1983 |
#define SSL_R_UNKNOWN_CIPHER_RETURNED 248
|
williamr@2
|
1984 |
#define SSL_R_UNKNOWN_CIPHER_TYPE 249
|
williamr@2
|
1985 |
#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 250
|
williamr@2
|
1986 |
#define SSL_R_UNKNOWN_PKEY_TYPE 251
|
williamr@2
|
1987 |
#define SSL_R_UNKNOWN_PROTOCOL 252
|
williamr@2
|
1988 |
#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 253
|
williamr@2
|
1989 |
#define SSL_R_UNKNOWN_SSL_VERSION 254
|
williamr@2
|
1990 |
#define SSL_R_UNKNOWN_STATE 255
|
williamr@2
|
1991 |
#define SSL_R_UNSUPPORTED_CIPHER 256
|
williamr@2
|
1992 |
#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 257
|
williamr@2
|
1993 |
#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE 315
|
williamr@2
|
1994 |
#define SSL_R_UNSUPPORTED_PROTOCOL 258
|
williamr@2
|
1995 |
#define SSL_R_UNSUPPORTED_SSL_VERSION 259
|
williamr@2
|
1996 |
#define SSL_R_WRITE_BIO_NOT_SET 260
|
williamr@2
|
1997 |
#define SSL_R_WRONG_CIPHER_RETURNED 261
|
williamr@2
|
1998 |
#define SSL_R_WRONG_MESSAGE_TYPE 262
|
williamr@2
|
1999 |
#define SSL_R_WRONG_NUMBER_OF_KEY_BITS 263
|
williamr@2
|
2000 |
#define SSL_R_WRONG_SIGNATURE_LENGTH 264
|
williamr@2
|
2001 |
#define SSL_R_WRONG_SIGNATURE_SIZE 265
|
williamr@2
|
2002 |
#define SSL_R_WRONG_SSL_VERSION 266
|
williamr@2
|
2003 |
#define SSL_R_WRONG_VERSION_NUMBER 267
|
williamr@2
|
2004 |
#define SSL_R_X509_LIB 268
|
williamr@2
|
2005 |
#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269
|
williamr@2
|
2006 |
|
williamr@2
|
2007 |
#ifdef __cplusplus
|
williamr@2
|
2008 |
}
|
williamr@2
|
2009 |
#endif
|
williamr@2
|
2010 |
#endif
|