summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libssl/src/ssl/ssl_stat.c643
-rw-r--r--src/lib/libssl/ssl_stat.c643
2 files changed, 814 insertions, 472 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_stat.c b/src/lib/libssl/src/ssl/ssl_stat.c
index 97a7fb69fb..d7f41dbf95 100644
--- a/src/lib/libssl/src/ssl/ssl_stat.c
+++ b/src/lib/libssl/src/ssl/ssl_stat.c
@@ -1,25 +1,25 @@
1/* $OpenBSD: ssl_stat.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ssl_stat.c,v 1.11 2014/07/13 00:08:44 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA, 11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation 12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms 13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com). 14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 * 15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in 16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed. 17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution 18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used. 19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or 20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package. 21 * in documentation (online or textual) provided with the package.
22 * 22 *
23 * Redistribution and use in source and binary forms, with or without 23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions 24 * modification, are permitted provided that the following conditions
25 * are met: 25 * are met:
@@ -34,10 +34,10 @@
34 * Eric Young (eay@cryptsoft.com)" 34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library 35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-). 36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from 37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement: 38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 * 40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -49,7 +49,7 @@
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE. 51 * SUCH DAMAGE.
52 * 52 *
53 * The licence and distribution terms for any publically available version or 53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be 54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence 55 * copied and put under another distribution licence
@@ -92,159 +92,229 @@ SSL_state_string_long(const SSL *s)
92 92
93 switch (s->state) { 93 switch (s->state) {
94 case SSL_ST_BEFORE: 94 case SSL_ST_BEFORE:
95 str="before SSL initialization"; break; 95 str = "before SSL initialization";
96 break;
96 case SSL_ST_ACCEPT: 97 case SSL_ST_ACCEPT:
97 str="before accept initialization"; break; 98 str = "before accept initialization";
99 break;
98 case SSL_ST_CONNECT: 100 case SSL_ST_CONNECT:
99 str="before connect initialization"; break; 101 str = "before connect initialization";
102 break;
100 case SSL_ST_OK: 103 case SSL_ST_OK:
101 str="SSL negotiation finished successfully"; break; 104 str = "SSL negotiation finished successfully";
105 break;
102 case SSL_ST_RENEGOTIATE: 106 case SSL_ST_RENEGOTIATE:
103 str="SSL renegotiate ciphers"; break; 107 str = "SSL renegotiate ciphers";
108 break;
104 case SSL_ST_BEFORE|SSL_ST_CONNECT: 109 case SSL_ST_BEFORE|SSL_ST_CONNECT:
105 str="before/connect initialization"; break; 110 str = "before/connect initialization";
111 break;
106 case SSL_ST_OK|SSL_ST_CONNECT: 112 case SSL_ST_OK|SSL_ST_CONNECT:
107 str="ok/connect SSL initialization"; break; 113 str = "ok/connect SSL initialization";
114 break;
108 case SSL_ST_BEFORE|SSL_ST_ACCEPT: 115 case SSL_ST_BEFORE|SSL_ST_ACCEPT:
109 str="before/accept initialization"; break; 116 str = "before/accept initialization";
117 break;
110 case SSL_ST_OK|SSL_ST_ACCEPT: 118 case SSL_ST_OK|SSL_ST_ACCEPT:
111 str="ok/accept SSL initialization"; break; 119 str = "ok/accept SSL initialization";
112/* SSLv3 additions */ 120 break;
121
122 /* SSLv3 additions */
113 case SSL3_ST_CW_CLNT_HELLO_A: 123 case SSL3_ST_CW_CLNT_HELLO_A:
114 str="SSLv3 write client hello A"; break; 124 str = "SSLv3 write client hello A";
125 break;
115 case SSL3_ST_CW_CLNT_HELLO_B: 126 case SSL3_ST_CW_CLNT_HELLO_B:
116 str="SSLv3 write client hello B"; break; 127 str = "SSLv3 write client hello B";
128 break;
117 case SSL3_ST_CR_SRVR_HELLO_A: 129 case SSL3_ST_CR_SRVR_HELLO_A:
118 str="SSLv3 read server hello A"; break; 130 str = "SSLv3 read server hello A";
131 break;
119 case SSL3_ST_CR_SRVR_HELLO_B: 132 case SSL3_ST_CR_SRVR_HELLO_B:
120 str="SSLv3 read server hello B"; break; 133 str = "SSLv3 read server hello B";
134 break;
121 case SSL3_ST_CR_CERT_A: 135 case SSL3_ST_CR_CERT_A:
122 str="SSLv3 read server certificate A"; break; 136 str = "SSLv3 read server certificate A";
137 break;
123 case SSL3_ST_CR_CERT_B: 138 case SSL3_ST_CR_CERT_B:
124 str="SSLv3 read server certificate B"; break; 139 str = "SSLv3 read server certificate B";
140 break;
125 case SSL3_ST_CR_KEY_EXCH_A: 141 case SSL3_ST_CR_KEY_EXCH_A:
126 str="SSLv3 read server key exchange A"; break; 142 str = "SSLv3 read server key exchange A";
143 break;
127 case SSL3_ST_CR_KEY_EXCH_B: 144 case SSL3_ST_CR_KEY_EXCH_B:
128 str="SSLv3 read server key exchange B"; break; 145 str = "SSLv3 read server key exchange B";
146 break;
129 case SSL3_ST_CR_CERT_REQ_A: 147 case SSL3_ST_CR_CERT_REQ_A:
130 str="SSLv3 read server certificate request A"; break; 148 str = "SSLv3 read server certificate request A";
149 break;
131 case SSL3_ST_CR_CERT_REQ_B: 150 case SSL3_ST_CR_CERT_REQ_B:
132 str="SSLv3 read server certificate request B"; break; 151 str = "SSLv3 read server certificate request B";
152 break;
133 case SSL3_ST_CR_SESSION_TICKET_A: 153 case SSL3_ST_CR_SESSION_TICKET_A:
134 str="SSLv3 read server session ticket A";break; 154 str = "SSLv3 read server session ticket A";
155 break;
135 case SSL3_ST_CR_SESSION_TICKET_B: 156 case SSL3_ST_CR_SESSION_TICKET_B:
136 str="SSLv3 read server session ticket B";break; 157 str = "SSLv3 read server session ticket B";
158 break;
137 case SSL3_ST_CR_SRVR_DONE_A: 159 case SSL3_ST_CR_SRVR_DONE_A:
138 str="SSLv3 read server done A"; break; 160 str = "SSLv3 read server done A";
161 break;
139 case SSL3_ST_CR_SRVR_DONE_B: 162 case SSL3_ST_CR_SRVR_DONE_B:
140 str="SSLv3 read server done B"; break; 163 str = "SSLv3 read server done B";
164 break;
141 case SSL3_ST_CW_CERT_A: 165 case SSL3_ST_CW_CERT_A:
142 str="SSLv3 write client certificate A"; break; 166 str = "SSLv3 write client certificate A";
167 break;
143 case SSL3_ST_CW_CERT_B: 168 case SSL3_ST_CW_CERT_B:
144 str="SSLv3 write client certificate B"; break; 169 str = "SSLv3 write client certificate B";
170 break;
145 case SSL3_ST_CW_CERT_C: 171 case SSL3_ST_CW_CERT_C:
146 str="SSLv3 write client certificate C"; break; 172 str = "SSLv3 write client certificate C";
173 break;
147 case SSL3_ST_CW_CERT_D: 174 case SSL3_ST_CW_CERT_D:
148 str="SSLv3 write client certificate D"; break; 175 str = "SSLv3 write client certificate D";
176 break;
149 case SSL3_ST_CW_KEY_EXCH_A: 177 case SSL3_ST_CW_KEY_EXCH_A:
150 str="SSLv3 write client key exchange A"; break; 178 str = "SSLv3 write client key exchange A";
179 break;
151 case SSL3_ST_CW_KEY_EXCH_B: 180 case SSL3_ST_CW_KEY_EXCH_B:
152 str="SSLv3 write client key exchange B"; break; 181 str = "SSLv3 write client key exchange B";
182 break;
153 case SSL3_ST_CW_CERT_VRFY_A: 183 case SSL3_ST_CW_CERT_VRFY_A:
154 str="SSLv3 write certificate verify A"; break; 184 str = "SSLv3 write certificate verify A";
185 break;
155 case SSL3_ST_CW_CERT_VRFY_B: 186 case SSL3_ST_CW_CERT_VRFY_B:
156 str="SSLv3 write certificate verify B"; break; 187 str = "SSLv3 write certificate verify B";
188 break;
157 189
158 case SSL3_ST_CW_CHANGE_A: 190 case SSL3_ST_CW_CHANGE_A:
159 case SSL3_ST_SW_CHANGE_A: 191 case SSL3_ST_SW_CHANGE_A:
160 str="SSLv3 write change cipher spec A"; break; 192 str = "SSLv3 write change cipher spec A";
161 case SSL3_ST_CW_CHANGE_B: 193 break;
194 case SSL3_ST_CW_CHANGE_B:
162 case SSL3_ST_SW_CHANGE_B: 195 case SSL3_ST_SW_CHANGE_B:
163 str="SSLv3 write change cipher spec B"; break; 196 str = "SSLv3 write change cipher spec B";
164 case SSL3_ST_CW_FINISHED_A: 197 break;
198 case SSL3_ST_CW_FINISHED_A:
165 case SSL3_ST_SW_FINISHED_A: 199 case SSL3_ST_SW_FINISHED_A:
166 str="SSLv3 write finished A"; break; 200 str = "SSLv3 write finished A";
167 case SSL3_ST_CW_FINISHED_B: 201 break;
202 case SSL3_ST_CW_FINISHED_B:
168 case SSL3_ST_SW_FINISHED_B: 203 case SSL3_ST_SW_FINISHED_B:
169 str="SSLv3 write finished B"; break; 204 str = "SSLv3 write finished B";
170 case SSL3_ST_CR_CHANGE_A: 205 break;
206 case SSL3_ST_CR_CHANGE_A:
171 case SSL3_ST_SR_CHANGE_A: 207 case SSL3_ST_SR_CHANGE_A:
172 str="SSLv3 read change cipher spec A"; break; 208 str = "SSLv3 read change cipher spec A";
173 case SSL3_ST_CR_CHANGE_B: 209 break;
210 case SSL3_ST_CR_CHANGE_B:
174 case SSL3_ST_SR_CHANGE_B: 211 case SSL3_ST_SR_CHANGE_B:
175 str="SSLv3 read change cipher spec B"; break; 212 str = "SSLv3 read change cipher spec B";
176 case SSL3_ST_CR_FINISHED_A: 213 break;
214 case SSL3_ST_CR_FINISHED_A:
177 case SSL3_ST_SR_FINISHED_A: 215 case SSL3_ST_SR_FINISHED_A:
178 str="SSLv3 read finished A"; break; 216 str = "SSLv3 read finished A";
179 case SSL3_ST_CR_FINISHED_B: 217 break;
218 case SSL3_ST_CR_FINISHED_B:
180 case SSL3_ST_SR_FINISHED_B: 219 case SSL3_ST_SR_FINISHED_B:
181 str="SSLv3 read finished B"; break; 220 str = "SSLv3 read finished B";
221 break;
182 222
183 case SSL3_ST_CW_FLUSH: 223 case SSL3_ST_CW_FLUSH:
184 case SSL3_ST_SW_FLUSH: 224 case SSL3_ST_SW_FLUSH:
185 str="SSLv3 flush data"; break; 225 str = "SSLv3 flush data";
226 break;
186 227
187 case SSL3_ST_SR_CLNT_HELLO_A: 228 case SSL3_ST_SR_CLNT_HELLO_A:
188 str="SSLv3 read client hello A"; break; 229 str = "SSLv3 read client hello A";
230 break;
189 case SSL3_ST_SR_CLNT_HELLO_B: 231 case SSL3_ST_SR_CLNT_HELLO_B:
190 str="SSLv3 read client hello B"; break; 232 str = "SSLv3 read client hello B";
233 break;
191 case SSL3_ST_SR_CLNT_HELLO_C: 234 case SSL3_ST_SR_CLNT_HELLO_C:
192 str="SSLv3 read client hello C"; break; 235 str = "SSLv3 read client hello C";
236 break;
193 case SSL3_ST_SW_HELLO_REQ_A: 237 case SSL3_ST_SW_HELLO_REQ_A:
194 str="SSLv3 write hello request A"; break; 238 str = "SSLv3 write hello request A";
239 break;
195 case SSL3_ST_SW_HELLO_REQ_B: 240 case SSL3_ST_SW_HELLO_REQ_B:
196 str="SSLv3 write hello request B"; break; 241 str = "SSLv3 write hello request B";
242 break;
197 case SSL3_ST_SW_HELLO_REQ_C: 243 case SSL3_ST_SW_HELLO_REQ_C:
198 str="SSLv3 write hello request C"; break; 244 str = "SSLv3 write hello request C";
245 break;
199 case SSL3_ST_SW_SRVR_HELLO_A: 246 case SSL3_ST_SW_SRVR_HELLO_A:
200 str="SSLv3 write server hello A"; break; 247 str = "SSLv3 write server hello A";
248 break;
201 case SSL3_ST_SW_SRVR_HELLO_B: 249 case SSL3_ST_SW_SRVR_HELLO_B:
202 str="SSLv3 write server hello B"; break; 250 str = "SSLv3 write server hello B";
251 break;
203 case SSL3_ST_SW_CERT_A: 252 case SSL3_ST_SW_CERT_A:
204 str="SSLv3 write certificate A"; break; 253 str = "SSLv3 write certificate A";
254 break;
205 case SSL3_ST_SW_CERT_B: 255 case SSL3_ST_SW_CERT_B:
206 str="SSLv3 write certificate B"; break; 256 str = "SSLv3 write certificate B";
257 break;
207 case SSL3_ST_SW_KEY_EXCH_A: 258 case SSL3_ST_SW_KEY_EXCH_A:
208 str="SSLv3 write key exchange A"; break; 259 str = "SSLv3 write key exchange A";
260 break;
209 case SSL3_ST_SW_KEY_EXCH_B: 261 case SSL3_ST_SW_KEY_EXCH_B:
210 str="SSLv3 write key exchange B"; break; 262 str = "SSLv3 write key exchange B";
263 break;
211 case SSL3_ST_SW_CERT_REQ_A: 264 case SSL3_ST_SW_CERT_REQ_A:
212 str="SSLv3 write certificate request A"; break; 265 str = "SSLv3 write certificate request A";
266 break;
213 case SSL3_ST_SW_CERT_REQ_B: 267 case SSL3_ST_SW_CERT_REQ_B:
214 str="SSLv3 write certificate request B"; break; 268 str = "SSLv3 write certificate request B";
269 break;
215 case SSL3_ST_SW_SESSION_TICKET_A: 270 case SSL3_ST_SW_SESSION_TICKET_A:
216 str="SSLv3 write session ticket A"; break; 271 str = "SSLv3 write session ticket A";
272 break;
217 case SSL3_ST_SW_SESSION_TICKET_B: 273 case SSL3_ST_SW_SESSION_TICKET_B:
218 str="SSLv3 write session ticket B"; break; 274 str = "SSLv3 write session ticket B";
275 break;
219 case SSL3_ST_SW_SRVR_DONE_A: 276 case SSL3_ST_SW_SRVR_DONE_A:
220 str="SSLv3 write server done A"; break; 277 str = "SSLv3 write server done A";
278 break;
221 case SSL3_ST_SW_SRVR_DONE_B: 279 case SSL3_ST_SW_SRVR_DONE_B:
222 str="SSLv3 write server done B"; break; 280 str = "SSLv3 write server done B";
281 break;
223 case SSL3_ST_SR_CERT_A: 282 case SSL3_ST_SR_CERT_A:
224 str="SSLv3 read client certificate A"; break; 283 str = "SSLv3 read client certificate A";
284 break;
225 case SSL3_ST_SR_CERT_B: 285 case SSL3_ST_SR_CERT_B:
226 str="SSLv3 read client certificate B"; break; 286 str = "SSLv3 read client certificate B";
287 break;
227 case SSL3_ST_SR_KEY_EXCH_A: 288 case SSL3_ST_SR_KEY_EXCH_A:
228 str="SSLv3 read client key exchange A"; break; 289 str = "SSLv3 read client key exchange A";
290 break;
229 case SSL3_ST_SR_KEY_EXCH_B: 291 case SSL3_ST_SR_KEY_EXCH_B:
230 str="SSLv3 read client key exchange B"; break; 292 str = "SSLv3 read client key exchange B";
293 break;
231 case SSL3_ST_SR_CERT_VRFY_A: 294 case SSL3_ST_SR_CERT_VRFY_A:
232 str="SSLv3 read certificate verify A"; break; 295 str = "SSLv3 read certificate verify A";
296 break;
233 case SSL3_ST_SR_CERT_VRFY_B: 297 case SSL3_ST_SR_CERT_VRFY_B:
234 str="SSLv3 read certificate verify B"; break; 298 str = "SSLv3 read certificate verify B";
299 break;
235 300
236/* DTLS */ 301 /* DTLS */
237 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: 302 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
238 str="DTLS1 read hello verify request A"; break; 303 str = "DTLS1 read hello verify request A";
304 break;
239 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: 305 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
240 str="DTLS1 read hello verify request B"; break; 306 str = "DTLS1 read hello verify request B";
307 break;
241 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: 308 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
242 str="DTLS1 write hello verify request A"; break; 309 str = "DTLS1 write hello verify request A";
310 break;
243 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: 311 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
244 str="DTLS1 write hello verify request B"; break; 312 str = "DTLS1 write hello verify request B";
313 break;
245 314
246 default: 315 default:
247 str="unknown state"; break; 316 str = "unknown state";
317 break;
248 } 318 }
249 return (str); 319 return (str);
250} 320}
@@ -256,13 +326,17 @@ SSL_rstate_string_long(const SSL *s)
256 326
257 switch (s->rstate) { 327 switch (s->rstate) {
258 case SSL_ST_READ_HEADER: 328 case SSL_ST_READ_HEADER:
259 str="read header"; break; 329 str = "read header";
330 break;
260 case SSL_ST_READ_BODY: 331 case SSL_ST_READ_BODY:
261 str="read body"; break; 332 str = "read body";
333 break;
262 case SSL_ST_READ_DONE: 334 case SSL_ST_READ_DONE:
263 str="read done"; break; 335 str = "read done";
336 break;
264 default: 337 default:
265 str="unknown"; break; 338 str = "unknown";
339 break;
266 } 340 }
267 return (str); 341 return (str);
268} 342}
@@ -274,140 +348,201 @@ SSL_state_string(const SSL *s)
274 348
275 switch (s->state) { 349 switch (s->state) {
276 case SSL_ST_BEFORE: 350 case SSL_ST_BEFORE:
277 str="PINIT "; break; 351 str = "PINIT ";
352 break;
278 case SSL_ST_ACCEPT: 353 case SSL_ST_ACCEPT:
279 str="AINIT "; break; 354 str = "AINIT ";
355 break;
280 case SSL_ST_CONNECT: 356 case SSL_ST_CONNECT:
281 str="CINIT "; break; 357 str = "CINIT ";
358 break;
282 case SSL_ST_OK: 359 case SSL_ST_OK:
283 str="SSLOK "; break; 360 str = "SSLOK ";
361 break;
284 362
285/* SSLv3 additions */ 363 /* SSLv3 additions */
286 case SSL3_ST_SW_FLUSH: 364 case SSL3_ST_SW_FLUSH:
287 case SSL3_ST_CW_FLUSH: 365 case SSL3_ST_CW_FLUSH:
288 str="3FLUSH"; break; 366 str = "3FLUSH";
367 break;
289 case SSL3_ST_CW_CLNT_HELLO_A: 368 case SSL3_ST_CW_CLNT_HELLO_A:
290 str="3WCH_A"; break; 369 str = "3WCH_A";
370 break;
291 case SSL3_ST_CW_CLNT_HELLO_B: 371 case SSL3_ST_CW_CLNT_HELLO_B:
292 str="3WCH_B"; break; 372 str = "3WCH_B";
373 break;
293 case SSL3_ST_CR_SRVR_HELLO_A: 374 case SSL3_ST_CR_SRVR_HELLO_A:
294 str="3RSH_A"; break; 375 str = "3RSH_A";
376 break;
295 case SSL3_ST_CR_SRVR_HELLO_B: 377 case SSL3_ST_CR_SRVR_HELLO_B:
296 str="3RSH_B"; break; 378 str = "3RSH_B";
379 break;
297 case SSL3_ST_CR_CERT_A: 380 case SSL3_ST_CR_CERT_A:
298 str="3RSC_A"; break; 381 str = "3RSC_A";
382 break;
299 case SSL3_ST_CR_CERT_B: 383 case SSL3_ST_CR_CERT_B:
300 str="3RSC_B"; break; 384 str = "3RSC_B";
385 break;
301 case SSL3_ST_CR_KEY_EXCH_A: 386 case SSL3_ST_CR_KEY_EXCH_A:
302 str="3RSKEA"; break; 387 str = "3RSKEA";
388 break;
303 case SSL3_ST_CR_KEY_EXCH_B: 389 case SSL3_ST_CR_KEY_EXCH_B:
304 str="3RSKEB"; break; 390 str = "3RSKEB";
391 break;
305 case SSL3_ST_CR_CERT_REQ_A: 392 case SSL3_ST_CR_CERT_REQ_A:
306 str="3RCR_A"; break; 393 str = "3RCR_A";
394 break;
307 case SSL3_ST_CR_CERT_REQ_B: 395 case SSL3_ST_CR_CERT_REQ_B:
308 str="3RCR_B"; break; 396 str = "3RCR_B";
397 break;
309 case SSL3_ST_CR_SRVR_DONE_A: 398 case SSL3_ST_CR_SRVR_DONE_A:
310 str="3RSD_A"; break; 399 str = "3RSD_A";
400 break;
311 case SSL3_ST_CR_SRVR_DONE_B: 401 case SSL3_ST_CR_SRVR_DONE_B:
312 str="3RSD_B"; break; 402 str = "3RSD_B";
403 break;
313 case SSL3_ST_CW_CERT_A: 404 case SSL3_ST_CW_CERT_A:
314 str="3WCC_A"; break; 405 str = "3WCC_A";
406 break;
315 case SSL3_ST_CW_CERT_B: 407 case SSL3_ST_CW_CERT_B:
316 str="3WCC_B"; break; 408 str = "3WCC_B";
409 break;
317 case SSL3_ST_CW_CERT_C: 410 case SSL3_ST_CW_CERT_C:
318 str="3WCC_C"; break; 411 str = "3WCC_C";
412 break;
319 case SSL3_ST_CW_CERT_D: 413 case SSL3_ST_CW_CERT_D:
320 str="3WCC_D"; break; 414 str = "3WCC_D";
415 break;
321 case SSL3_ST_CW_KEY_EXCH_A: 416 case SSL3_ST_CW_KEY_EXCH_A:
322 str="3WCKEA"; break; 417 str = "3WCKEA";
418 break;
323 case SSL3_ST_CW_KEY_EXCH_B: 419 case SSL3_ST_CW_KEY_EXCH_B:
324 str="3WCKEB"; break; 420 str = "3WCKEB";
421 break;
325 case SSL3_ST_CW_CERT_VRFY_A: 422 case SSL3_ST_CW_CERT_VRFY_A:
326 str="3WCV_A"; break; 423 str = "3WCV_A";
424 break;
327 case SSL3_ST_CW_CERT_VRFY_B: 425 case SSL3_ST_CW_CERT_VRFY_B:
328 str="3WCV_B"; break; 426 str = "3WCV_B";
427 break;
329 428
330 case SSL3_ST_SW_CHANGE_A: 429 case SSL3_ST_SW_CHANGE_A:
331 case SSL3_ST_CW_CHANGE_A: 430 case SSL3_ST_CW_CHANGE_A:
332 str="3WCCSA"; break; 431 str = "3WCCSA";
333 case SSL3_ST_SW_CHANGE_B: 432 break;
433 case SSL3_ST_SW_CHANGE_B:
334 case SSL3_ST_CW_CHANGE_B: 434 case SSL3_ST_CW_CHANGE_B:
335 str="3WCCSB"; break; 435 str = "3WCCSB";
336 case SSL3_ST_SW_FINISHED_A: 436 break;
437 case SSL3_ST_SW_FINISHED_A:
337 case SSL3_ST_CW_FINISHED_A: 438 case SSL3_ST_CW_FINISHED_A:
338 str="3WFINA"; break; 439 str = "3WFINA";
339 case SSL3_ST_SW_FINISHED_B: 440 break;
441 case SSL3_ST_SW_FINISHED_B:
340 case SSL3_ST_CW_FINISHED_B: 442 case SSL3_ST_CW_FINISHED_B:
341 str="3WFINB"; break; 443 str = "3WFINB";
342 case SSL3_ST_SR_CHANGE_A: 444 break;
445 case SSL3_ST_SR_CHANGE_A:
343 case SSL3_ST_CR_CHANGE_A: 446 case SSL3_ST_CR_CHANGE_A:
344 str="3RCCSA"; break; 447 str = "3RCCSA";
345 case SSL3_ST_SR_CHANGE_B: 448 break;
449 case SSL3_ST_SR_CHANGE_B:
346 case SSL3_ST_CR_CHANGE_B: 450 case SSL3_ST_CR_CHANGE_B:
347 str="3RCCSB"; break; 451 str = "3RCCSB";
348 case SSL3_ST_SR_FINISHED_A: 452 break;
453 case SSL3_ST_SR_FINISHED_A:
349 case SSL3_ST_CR_FINISHED_A: 454 case SSL3_ST_CR_FINISHED_A:
350 str="3RFINA"; break; 455 str = "3RFINA";
351 case SSL3_ST_SR_FINISHED_B: 456 break;
457 case SSL3_ST_SR_FINISHED_B:
352 case SSL3_ST_CR_FINISHED_B: 458 case SSL3_ST_CR_FINISHED_B:
353 str="3RFINB"; break; 459 str = "3RFINB";
460 break;
354 461
355 case SSL3_ST_SW_HELLO_REQ_A: 462 case SSL3_ST_SW_HELLO_REQ_A:
356 str="3WHR_A"; break; 463 str = "3WHR_A";
464 break;
357 case SSL3_ST_SW_HELLO_REQ_B: 465 case SSL3_ST_SW_HELLO_REQ_B:
358 str="3WHR_B"; break; 466 str = "3WHR_B";
467 break;
359 case SSL3_ST_SW_HELLO_REQ_C: 468 case SSL3_ST_SW_HELLO_REQ_C:
360 str="3WHR_C"; break; 469 str = "3WHR_C";
470 break;
361 case SSL3_ST_SR_CLNT_HELLO_A: 471 case SSL3_ST_SR_CLNT_HELLO_A:
362 str="3RCH_A"; break; 472 str = "3RCH_A";
473 break;
363 case SSL3_ST_SR_CLNT_HELLO_B: 474 case SSL3_ST_SR_CLNT_HELLO_B:
364 str="3RCH_B"; break; 475 str = "3RCH_B";
476 break;
365 case SSL3_ST_SR_CLNT_HELLO_C: 477 case SSL3_ST_SR_CLNT_HELLO_C:
366 str="3RCH_C"; break; 478 str = "3RCH_C";
479 break;
367 case SSL3_ST_SW_SRVR_HELLO_A: 480 case SSL3_ST_SW_SRVR_HELLO_A:
368 str="3WSH_A"; break; 481 str = "3WSH_A";
482 break;
369 case SSL3_ST_SW_SRVR_HELLO_B: 483 case SSL3_ST_SW_SRVR_HELLO_B:
370 str="3WSH_B"; break; 484 str = "3WSH_B";
485 break;
371 case SSL3_ST_SW_CERT_A: 486 case SSL3_ST_SW_CERT_A:
372 str="3WSC_A"; break; 487 str = "3WSC_A";
488 break;
373 case SSL3_ST_SW_CERT_B: 489 case SSL3_ST_SW_CERT_B:
374 str="3WSC_B"; break; 490 str = "3WSC_B";
491 break;
375 case SSL3_ST_SW_KEY_EXCH_A: 492 case SSL3_ST_SW_KEY_EXCH_A:
376 str="3WSKEA"; break; 493 str = "3WSKEA";
494 break;
377 case SSL3_ST_SW_KEY_EXCH_B: 495 case SSL3_ST_SW_KEY_EXCH_B:
378 str="3WSKEB"; break; 496 str = "3WSKEB";
497 break;
379 case SSL3_ST_SW_CERT_REQ_A: 498 case SSL3_ST_SW_CERT_REQ_A:
380 str="3WCR_A"; break; 499 str = "3WCR_A";
500 break;
381 case SSL3_ST_SW_CERT_REQ_B: 501 case SSL3_ST_SW_CERT_REQ_B:
382 str="3WCR_B"; break; 502 str = "3WCR_B";
503 break;
383 case SSL3_ST_SW_SRVR_DONE_A: 504 case SSL3_ST_SW_SRVR_DONE_A:
384 str="3WSD_A"; break; 505 str = "3WSD_A";
506 break;
385 case SSL3_ST_SW_SRVR_DONE_B: 507 case SSL3_ST_SW_SRVR_DONE_B:
386 str="3WSD_B"; break; 508 str = "3WSD_B";
509 break;
387 case SSL3_ST_SR_CERT_A: 510 case SSL3_ST_SR_CERT_A:
388 str="3RCC_A"; break; 511 str = "3RCC_A";
512 break;
389 case SSL3_ST_SR_CERT_B: 513 case SSL3_ST_SR_CERT_B:
390 str="3RCC_B"; break; 514 str = "3RCC_B";
515 break;
391 case SSL3_ST_SR_KEY_EXCH_A: 516 case SSL3_ST_SR_KEY_EXCH_A:
392 str="3RCKEA"; break; 517 str = "3RCKEA";
518 break;
393 case SSL3_ST_SR_KEY_EXCH_B: 519 case SSL3_ST_SR_KEY_EXCH_B:
394 str="3RCKEB"; break; 520 str = "3RCKEB";
521 break;
395 case SSL3_ST_SR_CERT_VRFY_A: 522 case SSL3_ST_SR_CERT_VRFY_A:
396 str="3RCV_A"; break; 523 str = "3RCV_A";
524 break;
397 case SSL3_ST_SR_CERT_VRFY_B: 525 case SSL3_ST_SR_CERT_VRFY_B:
398 str="3RCV_B"; break; 526 str = "3RCV_B";
399/* DTLS */ 527 break;
528
529 /* DTLS */
400 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: 530 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
401 str="DRCHVA"; break; 531 str = "DRCHVA";
532 break;
402 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: 533 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
403 str="DRCHVB"; break; 534 str = "DRCHVB";
535 break;
404 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: 536 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
405 str="DWCHVA"; break; 537 str = "DWCHVA";
538 break;
406 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: 539 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
407 str="DWCHVB"; break; 540 str = "DWCHVB";
541 break;
408 542
409 default: 543 default:
410 str="UNKWN "; break; 544 str = "UNKWN ";
545 break;
411 } 546 }
412 return (str); 547 return (str);
413} 548}
@@ -415,25 +550,25 @@ SSL_state_string(const SSL *s)
415const char * 550const char *
416SSL_alert_type_string_long(int value) 551SSL_alert_type_string_long(int value)
417{ 552{
418 value>>=8; 553 value >>= 8;
419 if (value == SSL3_AL_WARNING) 554 if (value == SSL3_AL_WARNING)
420 return("warning"); 555 return ("warning");
421 else if (value == SSL3_AL_FATAL) 556 else if (value == SSL3_AL_FATAL)
422 return("fatal"); 557 return ("fatal");
423 else 558 else
424 return("unknown"); 559 return ("unknown");
425} 560}
426 561
427const char * 562const char *
428SSL_alert_type_string(int value) 563SSL_alert_type_string(int value)
429{ 564{
430 value>>=8; 565 value >>= 8;
431 if (value == SSL3_AL_WARNING) 566 if (value == SSL3_AL_WARNING)
432 return("W"); 567 return ("W");
433 else if (value == SSL3_AL_FATAL) 568 else if (value == SSL3_AL_FATAL)
434 return("F"); 569 return ("F");
435 else 570 else
436 return("U"); 571 return ("U");
437} 572}
438 573
439const char * 574const char *
@@ -443,67 +578,98 @@ SSL_alert_desc_string(int value)
443 578
444 switch (value & 0xff) { 579 switch (value & 0xff) {
445 case SSL3_AD_CLOSE_NOTIFY: 580 case SSL3_AD_CLOSE_NOTIFY:
446 str="CN"; break; 581 str = "CN";
582 break;
447 case SSL3_AD_UNEXPECTED_MESSAGE: 583 case SSL3_AD_UNEXPECTED_MESSAGE:
448 str="UM"; break; 584 str = "UM";
585 break;
449 case SSL3_AD_BAD_RECORD_MAC: 586 case SSL3_AD_BAD_RECORD_MAC:
450 str="BM"; break; 587 str = "BM";
588 break;
451 case SSL3_AD_DECOMPRESSION_FAILURE: 589 case SSL3_AD_DECOMPRESSION_FAILURE:
452 str="DF"; break; 590 str = "DF";
591 break;
453 case SSL3_AD_HANDSHAKE_FAILURE: 592 case SSL3_AD_HANDSHAKE_FAILURE:
454 str="HF"; break; 593 str = "HF";
594 break;
455 case SSL3_AD_NO_CERTIFICATE: 595 case SSL3_AD_NO_CERTIFICATE:
456 str="NC"; break; 596 str = "NC";
597 break;
457 case SSL3_AD_BAD_CERTIFICATE: 598 case SSL3_AD_BAD_CERTIFICATE:
458 str="BC"; break; 599 str = "BC";
600 break;
459 case SSL3_AD_UNSUPPORTED_CERTIFICATE: 601 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
460 str="UC"; break; 602 str = "UC";
603 break;
461 case SSL3_AD_CERTIFICATE_REVOKED: 604 case SSL3_AD_CERTIFICATE_REVOKED:
462 str="CR"; break; 605 str = "CR";
606 break;
463 case SSL3_AD_CERTIFICATE_EXPIRED: 607 case SSL3_AD_CERTIFICATE_EXPIRED:
464 str="CE"; break; 608 str = "CE";
609 break;
465 case SSL3_AD_CERTIFICATE_UNKNOWN: 610 case SSL3_AD_CERTIFICATE_UNKNOWN:
466 str="CU"; break; 611 str = "CU";
612 break;
467 case SSL3_AD_ILLEGAL_PARAMETER: 613 case SSL3_AD_ILLEGAL_PARAMETER:
468 str="IP"; break; 614 str = "IP";
615 break;
469 case TLS1_AD_DECRYPTION_FAILED: 616 case TLS1_AD_DECRYPTION_FAILED:
470 str="DC"; break; 617 str = "DC";
618 break;
471 case TLS1_AD_RECORD_OVERFLOW: 619 case TLS1_AD_RECORD_OVERFLOW:
472 str="RO"; break; 620 str = "RO";
621 break;
473 case TLS1_AD_UNKNOWN_CA: 622 case TLS1_AD_UNKNOWN_CA:
474 str="CA"; break; 623 str = "CA";
624 break;
475 case TLS1_AD_ACCESS_DENIED: 625 case TLS1_AD_ACCESS_DENIED:
476 str="AD"; break; 626 str = "AD";
627 break;
477 case TLS1_AD_DECODE_ERROR: 628 case TLS1_AD_DECODE_ERROR:
478 str="DE"; break; 629 str = "DE";
630 break;
479 case TLS1_AD_DECRYPT_ERROR: 631 case TLS1_AD_DECRYPT_ERROR:
480 str="CY"; break; 632 str = "CY";
633 break;
481 case TLS1_AD_EXPORT_RESTRICTION: 634 case TLS1_AD_EXPORT_RESTRICTION:
482 str="ER"; break; 635 str = "ER";
636 break;
483 case TLS1_AD_PROTOCOL_VERSION: 637 case TLS1_AD_PROTOCOL_VERSION:
484 str="PV"; break; 638 str = "PV";
639 break;
485 case TLS1_AD_INSUFFICIENT_SECURITY: 640 case TLS1_AD_INSUFFICIENT_SECURITY:
486 str="IS"; break; 641 str = "IS";
642 break;
487 case TLS1_AD_INTERNAL_ERROR: 643 case TLS1_AD_INTERNAL_ERROR:
488 str="IE"; break; 644 str = "IE";
645 break;
489 case TLS1_AD_USER_CANCELLED: 646 case TLS1_AD_USER_CANCELLED:
490 str="US"; break; 647 str = "US";
648 break;
491 case TLS1_AD_NO_RENEGOTIATION: 649 case TLS1_AD_NO_RENEGOTIATION:
492 str="NR"; break; 650 str = "NR";
651 break;
493 case TLS1_AD_UNSUPPORTED_EXTENSION: 652 case TLS1_AD_UNSUPPORTED_EXTENSION:
494 str="UE"; break; 653 str = "UE";
654 break;
495 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: 655 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
496 str="CO"; break; 656 str = "CO";
657 break;
497 case TLS1_AD_UNRECOGNIZED_NAME: 658 case TLS1_AD_UNRECOGNIZED_NAME:
498 str="UN"; break; 659 str = "UN";
660 break;
499 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: 661 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
500 str="BR"; break; 662 str = "BR";
663 break;
501 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: 664 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
502 str="BH"; break; 665 str = "BH";
666 break;
503 case TLS1_AD_UNKNOWN_PSK_IDENTITY: 667 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
504 str="UP"; break; 668 str = "UP";
669 break;
505 default: 670 default:
506 str="UK"; break; 671 str = "UK";
672 break;
507 } 673 }
508 return (str); 674 return (str);
509} 675}
@@ -515,97 +681,98 @@ SSL_alert_desc_string_long(int value)
515 681
516 switch (value & 0xff) { 682 switch (value & 0xff) {
517 case SSL3_AD_CLOSE_NOTIFY: 683 case SSL3_AD_CLOSE_NOTIFY:
518 str="close notify"; 684 str = "close notify";
519 break; 685 break;
520 case SSL3_AD_UNEXPECTED_MESSAGE: 686 case SSL3_AD_UNEXPECTED_MESSAGE:
521 str="unexpected_message"; 687 str = "unexpected_message";
522 break; 688 break;
523 case SSL3_AD_BAD_RECORD_MAC: 689 case SSL3_AD_BAD_RECORD_MAC:
524 str="bad record mac"; 690 str = "bad record mac";
525 break; 691 break;
526 case SSL3_AD_DECOMPRESSION_FAILURE: 692 case SSL3_AD_DECOMPRESSION_FAILURE:
527 str="decompression failure"; 693 str = "decompression failure";
528 break; 694 break;
529 case SSL3_AD_HANDSHAKE_FAILURE: 695 case SSL3_AD_HANDSHAKE_FAILURE:
530 str="handshake failure"; 696 str = "handshake failure";
531 break; 697 break;
532 case SSL3_AD_NO_CERTIFICATE: 698 case SSL3_AD_NO_CERTIFICATE:
533 str="no certificate"; 699 str = "no certificate";
534 break; 700 break;
535 case SSL3_AD_BAD_CERTIFICATE: 701 case SSL3_AD_BAD_CERTIFICATE:
536 str="bad certificate"; 702 str = "bad certificate";
537 break; 703 break;
538 case SSL3_AD_UNSUPPORTED_CERTIFICATE: 704 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
539 str="unsupported certificate"; 705 str = "unsupported certificate";
540 break; 706 break;
541 case SSL3_AD_CERTIFICATE_REVOKED: 707 case SSL3_AD_CERTIFICATE_REVOKED:
542 str="certificate revoked"; 708 str = "certificate revoked";
543 break; 709 break;
544 case SSL3_AD_CERTIFICATE_EXPIRED: 710 case SSL3_AD_CERTIFICATE_EXPIRED:
545 str="certificate expired"; 711 str = "certificate expired";
546 break; 712 break;
547 case SSL3_AD_CERTIFICATE_UNKNOWN: 713 case SSL3_AD_CERTIFICATE_UNKNOWN:
548 str="certificate unknown"; 714 str = "certificate unknown";
549 break; 715 break;
550 case SSL3_AD_ILLEGAL_PARAMETER: 716 case SSL3_AD_ILLEGAL_PARAMETER:
551 str="illegal parameter"; 717 str = "illegal parameter";
552 break; 718 break;
553 case TLS1_AD_DECRYPTION_FAILED: 719 case TLS1_AD_DECRYPTION_FAILED:
554 str="decryption failed"; 720 str = "decryption failed";
555 break; 721 break;
556 case TLS1_AD_RECORD_OVERFLOW: 722 case TLS1_AD_RECORD_OVERFLOW:
557 str="record overflow"; 723 str = "record overflow";
558 break; 724 break;
559 case TLS1_AD_UNKNOWN_CA: 725 case TLS1_AD_UNKNOWN_CA:
560 str="unknown CA"; 726 str = "unknown CA";
561 break; 727 break;
562 case TLS1_AD_ACCESS_DENIED: 728 case TLS1_AD_ACCESS_DENIED:
563 str="access denied"; 729 str = "access denied";
564 break; 730 break;
565 case TLS1_AD_DECODE_ERROR: 731 case TLS1_AD_DECODE_ERROR:
566 str="decode error"; 732 str = "decode error";
567 break; 733 break;
568 case TLS1_AD_DECRYPT_ERROR: 734 case TLS1_AD_DECRYPT_ERROR:
569 str="decrypt error"; 735 str = "decrypt error";
570 break; 736 break;
571 case TLS1_AD_EXPORT_RESTRICTION: 737 case TLS1_AD_EXPORT_RESTRICTION:
572 str="export restriction"; 738 str = "export restriction";
573 break; 739 break;
574 case TLS1_AD_PROTOCOL_VERSION: 740 case TLS1_AD_PROTOCOL_VERSION:
575 str="protocol version"; 741 str = "protocol version";
576 break; 742 break;
577 case TLS1_AD_INSUFFICIENT_SECURITY: 743 case TLS1_AD_INSUFFICIENT_SECURITY:
578 str="insufficient security"; 744 str = "insufficient security";
579 break; 745 break;
580 case TLS1_AD_INTERNAL_ERROR: 746 case TLS1_AD_INTERNAL_ERROR:
581 str="internal error"; 747 str = "internal error";
582 break; 748 break;
583 case TLS1_AD_USER_CANCELLED: 749 case TLS1_AD_USER_CANCELLED:
584 str="user canceled"; 750 str = "user canceled";
585 break; 751 break;
586 case TLS1_AD_NO_RENEGOTIATION: 752 case TLS1_AD_NO_RENEGOTIATION:
587 str="no renegotiation"; 753 str = "no renegotiation";
588 break; 754 break;
589 case TLS1_AD_UNSUPPORTED_EXTENSION: 755 case TLS1_AD_UNSUPPORTED_EXTENSION:
590 str="unsupported extension"; 756 str = "unsupported extension";
591 break; 757 break;
592 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: 758 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
593 str="certificate unobtainable"; 759 str = "certificate unobtainable";
594 break; 760 break;
595 case TLS1_AD_UNRECOGNIZED_NAME: 761 case TLS1_AD_UNRECOGNIZED_NAME:
596 str="unrecognized name"; 762 str = "unrecognized name";
597 break; 763 break;
598 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: 764 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
599 str="bad certificate status response"; 765 str = "bad certificate status response";
600 break; 766 break;
601 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: 767 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
602 str="bad certificate hash value"; 768 str = "bad certificate hash value";
603 break; 769 break;
604 case TLS1_AD_UNKNOWN_PSK_IDENTITY: 770 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
605 str="unknown PSK identity"; 771 str = "unknown PSK identity";
606 break; 772 break;
607 default: 773 default:
608 str="unknown"; break; 774 str = "unknown";
775 break;
609 } 776 }
610 return (str); 777 return (str);
611} 778}
@@ -617,13 +784,17 @@ SSL_rstate_string(const SSL *s)
617 784
618 switch (s->rstate) { 785 switch (s->rstate) {
619 case SSL_ST_READ_HEADER: 786 case SSL_ST_READ_HEADER:
620 str="RH"; break; 787 str = "RH";
788 break;
621 case SSL_ST_READ_BODY: 789 case SSL_ST_READ_BODY:
622 str="RB"; break; 790 str = "RB";
791 break;
623 case SSL_ST_READ_DONE: 792 case SSL_ST_READ_DONE:
624 str="RD"; break; 793 str = "RD";
794 break;
625 default: 795 default:
626 str="unknown"; break; 796 str = "unknown";
797 break;
627 } 798 }
628 return (str); 799 return (str);
629} 800}
diff --git a/src/lib/libssl/ssl_stat.c b/src/lib/libssl/ssl_stat.c
index 97a7fb69fb..d7f41dbf95 100644
--- a/src/lib/libssl/ssl_stat.c
+++ b/src/lib/libssl/ssl_stat.c
@@ -1,25 +1,25 @@
1/* $OpenBSD: ssl_stat.c,v 1.10 2014/06/12 15:49:31 deraadt Exp $ */ 1/* $OpenBSD: ssl_stat.c,v 1.11 2014/07/13 00:08:44 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
5 * This package is an SSL implementation written 5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com). 6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL. 7 * The implementation was written so as to conform with Netscapes SSL.
8 * 8 *
9 * This library is free for commercial and non-commercial use as long as 9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions 10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA, 11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation 12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms 13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com). 14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 * 15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in 16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed. 17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution 18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used. 19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or 20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package. 21 * in documentation (online or textual) provided with the package.
22 * 22 *
23 * Redistribution and use in source and binary forms, with or without 23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions 24 * modification, are permitted provided that the following conditions
25 * are met: 25 * are met:
@@ -34,10 +34,10 @@
34 * Eric Young (eay@cryptsoft.com)" 34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library 35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-). 36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from 37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement: 38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" 39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 * 40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND 41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
@@ -49,7 +49,7 @@
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE. 51 * SUCH DAMAGE.
52 * 52 *
53 * The licence and distribution terms for any publically available version or 53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be 54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence 55 * copied and put under another distribution licence
@@ -92,159 +92,229 @@ SSL_state_string_long(const SSL *s)
92 92
93 switch (s->state) { 93 switch (s->state) {
94 case SSL_ST_BEFORE: 94 case SSL_ST_BEFORE:
95 str="before SSL initialization"; break; 95 str = "before SSL initialization";
96 break;
96 case SSL_ST_ACCEPT: 97 case SSL_ST_ACCEPT:
97 str="before accept initialization"; break; 98 str = "before accept initialization";
99 break;
98 case SSL_ST_CONNECT: 100 case SSL_ST_CONNECT:
99 str="before connect initialization"; break; 101 str = "before connect initialization";
102 break;
100 case SSL_ST_OK: 103 case SSL_ST_OK:
101 str="SSL negotiation finished successfully"; break; 104 str = "SSL negotiation finished successfully";
105 break;
102 case SSL_ST_RENEGOTIATE: 106 case SSL_ST_RENEGOTIATE:
103 str="SSL renegotiate ciphers"; break; 107 str = "SSL renegotiate ciphers";
108 break;
104 case SSL_ST_BEFORE|SSL_ST_CONNECT: 109 case SSL_ST_BEFORE|SSL_ST_CONNECT:
105 str="before/connect initialization"; break; 110 str = "before/connect initialization";
111 break;
106 case SSL_ST_OK|SSL_ST_CONNECT: 112 case SSL_ST_OK|SSL_ST_CONNECT:
107 str="ok/connect SSL initialization"; break; 113 str = "ok/connect SSL initialization";
114 break;
108 case SSL_ST_BEFORE|SSL_ST_ACCEPT: 115 case SSL_ST_BEFORE|SSL_ST_ACCEPT:
109 str="before/accept initialization"; break; 116 str = "before/accept initialization";
117 break;
110 case SSL_ST_OK|SSL_ST_ACCEPT: 118 case SSL_ST_OK|SSL_ST_ACCEPT:
111 str="ok/accept SSL initialization"; break; 119 str = "ok/accept SSL initialization";
112/* SSLv3 additions */ 120 break;
121
122 /* SSLv3 additions */
113 case SSL3_ST_CW_CLNT_HELLO_A: 123 case SSL3_ST_CW_CLNT_HELLO_A:
114 str="SSLv3 write client hello A"; break; 124 str = "SSLv3 write client hello A";
125 break;
115 case SSL3_ST_CW_CLNT_HELLO_B: 126 case SSL3_ST_CW_CLNT_HELLO_B:
116 str="SSLv3 write client hello B"; break; 127 str = "SSLv3 write client hello B";
128 break;
117 case SSL3_ST_CR_SRVR_HELLO_A: 129 case SSL3_ST_CR_SRVR_HELLO_A:
118 str="SSLv3 read server hello A"; break; 130 str = "SSLv3 read server hello A";
131 break;
119 case SSL3_ST_CR_SRVR_HELLO_B: 132 case SSL3_ST_CR_SRVR_HELLO_B:
120 str="SSLv3 read server hello B"; break; 133 str = "SSLv3 read server hello B";
134 break;
121 case SSL3_ST_CR_CERT_A: 135 case SSL3_ST_CR_CERT_A:
122 str="SSLv3 read server certificate A"; break; 136 str = "SSLv3 read server certificate A";
137 break;
123 case SSL3_ST_CR_CERT_B: 138 case SSL3_ST_CR_CERT_B:
124 str="SSLv3 read server certificate B"; break; 139 str = "SSLv3 read server certificate B";
140 break;
125 case SSL3_ST_CR_KEY_EXCH_A: 141 case SSL3_ST_CR_KEY_EXCH_A:
126 str="SSLv3 read server key exchange A"; break; 142 str = "SSLv3 read server key exchange A";
143 break;
127 case SSL3_ST_CR_KEY_EXCH_B: 144 case SSL3_ST_CR_KEY_EXCH_B:
128 str="SSLv3 read server key exchange B"; break; 145 str = "SSLv3 read server key exchange B";
146 break;
129 case SSL3_ST_CR_CERT_REQ_A: 147 case SSL3_ST_CR_CERT_REQ_A:
130 str="SSLv3 read server certificate request A"; break; 148 str = "SSLv3 read server certificate request A";
149 break;
131 case SSL3_ST_CR_CERT_REQ_B: 150 case SSL3_ST_CR_CERT_REQ_B:
132 str="SSLv3 read server certificate request B"; break; 151 str = "SSLv3 read server certificate request B";
152 break;
133 case SSL3_ST_CR_SESSION_TICKET_A: 153 case SSL3_ST_CR_SESSION_TICKET_A:
134 str="SSLv3 read server session ticket A";break; 154 str = "SSLv3 read server session ticket A";
155 break;
135 case SSL3_ST_CR_SESSION_TICKET_B: 156 case SSL3_ST_CR_SESSION_TICKET_B:
136 str="SSLv3 read server session ticket B";break; 157 str = "SSLv3 read server session ticket B";
158 break;
137 case SSL3_ST_CR_SRVR_DONE_A: 159 case SSL3_ST_CR_SRVR_DONE_A:
138 str="SSLv3 read server done A"; break; 160 str = "SSLv3 read server done A";
161 break;
139 case SSL3_ST_CR_SRVR_DONE_B: 162 case SSL3_ST_CR_SRVR_DONE_B:
140 str="SSLv3 read server done B"; break; 163 str = "SSLv3 read server done B";
164 break;
141 case SSL3_ST_CW_CERT_A: 165 case SSL3_ST_CW_CERT_A:
142 str="SSLv3 write client certificate A"; break; 166 str = "SSLv3 write client certificate A";
167 break;
143 case SSL3_ST_CW_CERT_B: 168 case SSL3_ST_CW_CERT_B:
144 str="SSLv3 write client certificate B"; break; 169 str = "SSLv3 write client certificate B";
170 break;
145 case SSL3_ST_CW_CERT_C: 171 case SSL3_ST_CW_CERT_C:
146 str="SSLv3 write client certificate C"; break; 172 str = "SSLv3 write client certificate C";
173 break;
147 case SSL3_ST_CW_CERT_D: 174 case SSL3_ST_CW_CERT_D:
148 str="SSLv3 write client certificate D"; break; 175 str = "SSLv3 write client certificate D";
176 break;
149 case SSL3_ST_CW_KEY_EXCH_A: 177 case SSL3_ST_CW_KEY_EXCH_A:
150 str="SSLv3 write client key exchange A"; break; 178 str = "SSLv3 write client key exchange A";
179 break;
151 case SSL3_ST_CW_KEY_EXCH_B: 180 case SSL3_ST_CW_KEY_EXCH_B:
152 str="SSLv3 write client key exchange B"; break; 181 str = "SSLv3 write client key exchange B";
182 break;
153 case SSL3_ST_CW_CERT_VRFY_A: 183 case SSL3_ST_CW_CERT_VRFY_A:
154 str="SSLv3 write certificate verify A"; break; 184 str = "SSLv3 write certificate verify A";
185 break;
155 case SSL3_ST_CW_CERT_VRFY_B: 186 case SSL3_ST_CW_CERT_VRFY_B:
156 str="SSLv3 write certificate verify B"; break; 187 str = "SSLv3 write certificate verify B";
188 break;
157 189
158 case SSL3_ST_CW_CHANGE_A: 190 case SSL3_ST_CW_CHANGE_A:
159 case SSL3_ST_SW_CHANGE_A: 191 case SSL3_ST_SW_CHANGE_A:
160 str="SSLv3 write change cipher spec A"; break; 192 str = "SSLv3 write change cipher spec A";
161 case SSL3_ST_CW_CHANGE_B: 193 break;
194 case SSL3_ST_CW_CHANGE_B:
162 case SSL3_ST_SW_CHANGE_B: 195 case SSL3_ST_SW_CHANGE_B:
163 str="SSLv3 write change cipher spec B"; break; 196 str = "SSLv3 write change cipher spec B";
164 case SSL3_ST_CW_FINISHED_A: 197 break;
198 case SSL3_ST_CW_FINISHED_A:
165 case SSL3_ST_SW_FINISHED_A: 199 case SSL3_ST_SW_FINISHED_A:
166 str="SSLv3 write finished A"; break; 200 str = "SSLv3 write finished A";
167 case SSL3_ST_CW_FINISHED_B: 201 break;
202 case SSL3_ST_CW_FINISHED_B:
168 case SSL3_ST_SW_FINISHED_B: 203 case SSL3_ST_SW_FINISHED_B:
169 str="SSLv3 write finished B"; break; 204 str = "SSLv3 write finished B";
170 case SSL3_ST_CR_CHANGE_A: 205 break;
206 case SSL3_ST_CR_CHANGE_A:
171 case SSL3_ST_SR_CHANGE_A: 207 case SSL3_ST_SR_CHANGE_A:
172 str="SSLv3 read change cipher spec A"; break; 208 str = "SSLv3 read change cipher spec A";
173 case SSL3_ST_CR_CHANGE_B: 209 break;
210 case SSL3_ST_CR_CHANGE_B:
174 case SSL3_ST_SR_CHANGE_B: 211 case SSL3_ST_SR_CHANGE_B:
175 str="SSLv3 read change cipher spec B"; break; 212 str = "SSLv3 read change cipher spec B";
176 case SSL3_ST_CR_FINISHED_A: 213 break;
214 case SSL3_ST_CR_FINISHED_A:
177 case SSL3_ST_SR_FINISHED_A: 215 case SSL3_ST_SR_FINISHED_A:
178 str="SSLv3 read finished A"; break; 216 str = "SSLv3 read finished A";
179 case SSL3_ST_CR_FINISHED_B: 217 break;
218 case SSL3_ST_CR_FINISHED_B:
180 case SSL3_ST_SR_FINISHED_B: 219 case SSL3_ST_SR_FINISHED_B:
181 str="SSLv3 read finished B"; break; 220 str = "SSLv3 read finished B";
221 break;
182 222
183 case SSL3_ST_CW_FLUSH: 223 case SSL3_ST_CW_FLUSH:
184 case SSL3_ST_SW_FLUSH: 224 case SSL3_ST_SW_FLUSH:
185 str="SSLv3 flush data"; break; 225 str = "SSLv3 flush data";
226 break;
186 227
187 case SSL3_ST_SR_CLNT_HELLO_A: 228 case SSL3_ST_SR_CLNT_HELLO_A:
188 str="SSLv3 read client hello A"; break; 229 str = "SSLv3 read client hello A";
230 break;
189 case SSL3_ST_SR_CLNT_HELLO_B: 231 case SSL3_ST_SR_CLNT_HELLO_B:
190 str="SSLv3 read client hello B"; break; 232 str = "SSLv3 read client hello B";
233 break;
191 case SSL3_ST_SR_CLNT_HELLO_C: 234 case SSL3_ST_SR_CLNT_HELLO_C:
192 str="SSLv3 read client hello C"; break; 235 str = "SSLv3 read client hello C";
236 break;
193 case SSL3_ST_SW_HELLO_REQ_A: 237 case SSL3_ST_SW_HELLO_REQ_A:
194 str="SSLv3 write hello request A"; break; 238 str = "SSLv3 write hello request A";
239 break;
195 case SSL3_ST_SW_HELLO_REQ_B: 240 case SSL3_ST_SW_HELLO_REQ_B:
196 str="SSLv3 write hello request B"; break; 241 str = "SSLv3 write hello request B";
242 break;
197 case SSL3_ST_SW_HELLO_REQ_C: 243 case SSL3_ST_SW_HELLO_REQ_C:
198 str="SSLv3 write hello request C"; break; 244 str = "SSLv3 write hello request C";
245 break;
199 case SSL3_ST_SW_SRVR_HELLO_A: 246 case SSL3_ST_SW_SRVR_HELLO_A:
200 str="SSLv3 write server hello A"; break; 247 str = "SSLv3 write server hello A";
248 break;
201 case SSL3_ST_SW_SRVR_HELLO_B: 249 case SSL3_ST_SW_SRVR_HELLO_B:
202 str="SSLv3 write server hello B"; break; 250 str = "SSLv3 write server hello B";
251 break;
203 case SSL3_ST_SW_CERT_A: 252 case SSL3_ST_SW_CERT_A:
204 str="SSLv3 write certificate A"; break; 253 str = "SSLv3 write certificate A";
254 break;
205 case SSL3_ST_SW_CERT_B: 255 case SSL3_ST_SW_CERT_B:
206 str="SSLv3 write certificate B"; break; 256 str = "SSLv3 write certificate B";
257 break;
207 case SSL3_ST_SW_KEY_EXCH_A: 258 case SSL3_ST_SW_KEY_EXCH_A:
208 str="SSLv3 write key exchange A"; break; 259 str = "SSLv3 write key exchange A";
260 break;
209 case SSL3_ST_SW_KEY_EXCH_B: 261 case SSL3_ST_SW_KEY_EXCH_B:
210 str="SSLv3 write key exchange B"; break; 262 str = "SSLv3 write key exchange B";
263 break;
211 case SSL3_ST_SW_CERT_REQ_A: 264 case SSL3_ST_SW_CERT_REQ_A:
212 str="SSLv3 write certificate request A"; break; 265 str = "SSLv3 write certificate request A";
266 break;
213 case SSL3_ST_SW_CERT_REQ_B: 267 case SSL3_ST_SW_CERT_REQ_B:
214 str="SSLv3 write certificate request B"; break; 268 str = "SSLv3 write certificate request B";
269 break;
215 case SSL3_ST_SW_SESSION_TICKET_A: 270 case SSL3_ST_SW_SESSION_TICKET_A:
216 str="SSLv3 write session ticket A"; break; 271 str = "SSLv3 write session ticket A";
272 break;
217 case SSL3_ST_SW_SESSION_TICKET_B: 273 case SSL3_ST_SW_SESSION_TICKET_B:
218 str="SSLv3 write session ticket B"; break; 274 str = "SSLv3 write session ticket B";
275 break;
219 case SSL3_ST_SW_SRVR_DONE_A: 276 case SSL3_ST_SW_SRVR_DONE_A:
220 str="SSLv3 write server done A"; break; 277 str = "SSLv3 write server done A";
278 break;
221 case SSL3_ST_SW_SRVR_DONE_B: 279 case SSL3_ST_SW_SRVR_DONE_B:
222 str="SSLv3 write server done B"; break; 280 str = "SSLv3 write server done B";
281 break;
223 case SSL3_ST_SR_CERT_A: 282 case SSL3_ST_SR_CERT_A:
224 str="SSLv3 read client certificate A"; break; 283 str = "SSLv3 read client certificate A";
284 break;
225 case SSL3_ST_SR_CERT_B: 285 case SSL3_ST_SR_CERT_B:
226 str="SSLv3 read client certificate B"; break; 286 str = "SSLv3 read client certificate B";
287 break;
227 case SSL3_ST_SR_KEY_EXCH_A: 288 case SSL3_ST_SR_KEY_EXCH_A:
228 str="SSLv3 read client key exchange A"; break; 289 str = "SSLv3 read client key exchange A";
290 break;
229 case SSL3_ST_SR_KEY_EXCH_B: 291 case SSL3_ST_SR_KEY_EXCH_B:
230 str="SSLv3 read client key exchange B"; break; 292 str = "SSLv3 read client key exchange B";
293 break;
231 case SSL3_ST_SR_CERT_VRFY_A: 294 case SSL3_ST_SR_CERT_VRFY_A:
232 str="SSLv3 read certificate verify A"; break; 295 str = "SSLv3 read certificate verify A";
296 break;
233 case SSL3_ST_SR_CERT_VRFY_B: 297 case SSL3_ST_SR_CERT_VRFY_B:
234 str="SSLv3 read certificate verify B"; break; 298 str = "SSLv3 read certificate verify B";
299 break;
235 300
236/* DTLS */ 301 /* DTLS */
237 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: 302 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
238 str="DTLS1 read hello verify request A"; break; 303 str = "DTLS1 read hello verify request A";
304 break;
239 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: 305 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
240 str="DTLS1 read hello verify request B"; break; 306 str = "DTLS1 read hello verify request B";
307 break;
241 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: 308 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
242 str="DTLS1 write hello verify request A"; break; 309 str = "DTLS1 write hello verify request A";
310 break;
243 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: 311 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
244 str="DTLS1 write hello verify request B"; break; 312 str = "DTLS1 write hello verify request B";
313 break;
245 314
246 default: 315 default:
247 str="unknown state"; break; 316 str = "unknown state";
317 break;
248 } 318 }
249 return (str); 319 return (str);
250} 320}
@@ -256,13 +326,17 @@ SSL_rstate_string_long(const SSL *s)
256 326
257 switch (s->rstate) { 327 switch (s->rstate) {
258 case SSL_ST_READ_HEADER: 328 case SSL_ST_READ_HEADER:
259 str="read header"; break; 329 str = "read header";
330 break;
260 case SSL_ST_READ_BODY: 331 case SSL_ST_READ_BODY:
261 str="read body"; break; 332 str = "read body";
333 break;
262 case SSL_ST_READ_DONE: 334 case SSL_ST_READ_DONE:
263 str="read done"; break; 335 str = "read done";
336 break;
264 default: 337 default:
265 str="unknown"; break; 338 str = "unknown";
339 break;
266 } 340 }
267 return (str); 341 return (str);
268} 342}
@@ -274,140 +348,201 @@ SSL_state_string(const SSL *s)
274 348
275 switch (s->state) { 349 switch (s->state) {
276 case SSL_ST_BEFORE: 350 case SSL_ST_BEFORE:
277 str="PINIT "; break; 351 str = "PINIT ";
352 break;
278 case SSL_ST_ACCEPT: 353 case SSL_ST_ACCEPT:
279 str="AINIT "; break; 354 str = "AINIT ";
355 break;
280 case SSL_ST_CONNECT: 356 case SSL_ST_CONNECT:
281 str="CINIT "; break; 357 str = "CINIT ";
358 break;
282 case SSL_ST_OK: 359 case SSL_ST_OK:
283 str="SSLOK "; break; 360 str = "SSLOK ";
361 break;
284 362
285/* SSLv3 additions */ 363 /* SSLv3 additions */
286 case SSL3_ST_SW_FLUSH: 364 case SSL3_ST_SW_FLUSH:
287 case SSL3_ST_CW_FLUSH: 365 case SSL3_ST_CW_FLUSH:
288 str="3FLUSH"; break; 366 str = "3FLUSH";
367 break;
289 case SSL3_ST_CW_CLNT_HELLO_A: 368 case SSL3_ST_CW_CLNT_HELLO_A:
290 str="3WCH_A"; break; 369 str = "3WCH_A";
370 break;
291 case SSL3_ST_CW_CLNT_HELLO_B: 371 case SSL3_ST_CW_CLNT_HELLO_B:
292 str="3WCH_B"; break; 372 str = "3WCH_B";
373 break;
293 case SSL3_ST_CR_SRVR_HELLO_A: 374 case SSL3_ST_CR_SRVR_HELLO_A:
294 str="3RSH_A"; break; 375 str = "3RSH_A";
376 break;
295 case SSL3_ST_CR_SRVR_HELLO_B: 377 case SSL3_ST_CR_SRVR_HELLO_B:
296 str="3RSH_B"; break; 378 str = "3RSH_B";
379 break;
297 case SSL3_ST_CR_CERT_A: 380 case SSL3_ST_CR_CERT_A:
298 str="3RSC_A"; break; 381 str = "3RSC_A";
382 break;
299 case SSL3_ST_CR_CERT_B: 383 case SSL3_ST_CR_CERT_B:
300 str="3RSC_B"; break; 384 str = "3RSC_B";
385 break;
301 case SSL3_ST_CR_KEY_EXCH_A: 386 case SSL3_ST_CR_KEY_EXCH_A:
302 str="3RSKEA"; break; 387 str = "3RSKEA";
388 break;
303 case SSL3_ST_CR_KEY_EXCH_B: 389 case SSL3_ST_CR_KEY_EXCH_B:
304 str="3RSKEB"; break; 390 str = "3RSKEB";
391 break;
305 case SSL3_ST_CR_CERT_REQ_A: 392 case SSL3_ST_CR_CERT_REQ_A:
306 str="3RCR_A"; break; 393 str = "3RCR_A";
394 break;
307 case SSL3_ST_CR_CERT_REQ_B: 395 case SSL3_ST_CR_CERT_REQ_B:
308 str="3RCR_B"; break; 396 str = "3RCR_B";
397 break;
309 case SSL3_ST_CR_SRVR_DONE_A: 398 case SSL3_ST_CR_SRVR_DONE_A:
310 str="3RSD_A"; break; 399 str = "3RSD_A";
400 break;
311 case SSL3_ST_CR_SRVR_DONE_B: 401 case SSL3_ST_CR_SRVR_DONE_B:
312 str="3RSD_B"; break; 402 str = "3RSD_B";
403 break;
313 case SSL3_ST_CW_CERT_A: 404 case SSL3_ST_CW_CERT_A:
314 str="3WCC_A"; break; 405 str = "3WCC_A";
406 break;
315 case SSL3_ST_CW_CERT_B: 407 case SSL3_ST_CW_CERT_B:
316 str="3WCC_B"; break; 408 str = "3WCC_B";
409 break;
317 case SSL3_ST_CW_CERT_C: 410 case SSL3_ST_CW_CERT_C:
318 str="3WCC_C"; break; 411 str = "3WCC_C";
412 break;
319 case SSL3_ST_CW_CERT_D: 413 case SSL3_ST_CW_CERT_D:
320 str="3WCC_D"; break; 414 str = "3WCC_D";
415 break;
321 case SSL3_ST_CW_KEY_EXCH_A: 416 case SSL3_ST_CW_KEY_EXCH_A:
322 str="3WCKEA"; break; 417 str = "3WCKEA";
418 break;
323 case SSL3_ST_CW_KEY_EXCH_B: 419 case SSL3_ST_CW_KEY_EXCH_B:
324 str="3WCKEB"; break; 420 str = "3WCKEB";
421 break;
325 case SSL3_ST_CW_CERT_VRFY_A: 422 case SSL3_ST_CW_CERT_VRFY_A:
326 str="3WCV_A"; break; 423 str = "3WCV_A";
424 break;
327 case SSL3_ST_CW_CERT_VRFY_B: 425 case SSL3_ST_CW_CERT_VRFY_B:
328 str="3WCV_B"; break; 426 str = "3WCV_B";
427 break;
329 428
330 case SSL3_ST_SW_CHANGE_A: 429 case SSL3_ST_SW_CHANGE_A:
331 case SSL3_ST_CW_CHANGE_A: 430 case SSL3_ST_CW_CHANGE_A:
332 str="3WCCSA"; break; 431 str = "3WCCSA";
333 case SSL3_ST_SW_CHANGE_B: 432 break;
433 case SSL3_ST_SW_CHANGE_B:
334 case SSL3_ST_CW_CHANGE_B: 434 case SSL3_ST_CW_CHANGE_B:
335 str="3WCCSB"; break; 435 str = "3WCCSB";
336 case SSL3_ST_SW_FINISHED_A: 436 break;
437 case SSL3_ST_SW_FINISHED_A:
337 case SSL3_ST_CW_FINISHED_A: 438 case SSL3_ST_CW_FINISHED_A:
338 str="3WFINA"; break; 439 str = "3WFINA";
339 case SSL3_ST_SW_FINISHED_B: 440 break;
441 case SSL3_ST_SW_FINISHED_B:
340 case SSL3_ST_CW_FINISHED_B: 442 case SSL3_ST_CW_FINISHED_B:
341 str="3WFINB"; break; 443 str = "3WFINB";
342 case SSL3_ST_SR_CHANGE_A: 444 break;
445 case SSL3_ST_SR_CHANGE_A:
343 case SSL3_ST_CR_CHANGE_A: 446 case SSL3_ST_CR_CHANGE_A:
344 str="3RCCSA"; break; 447 str = "3RCCSA";
345 case SSL3_ST_SR_CHANGE_B: 448 break;
449 case SSL3_ST_SR_CHANGE_B:
346 case SSL3_ST_CR_CHANGE_B: 450 case SSL3_ST_CR_CHANGE_B:
347 str="3RCCSB"; break; 451 str = "3RCCSB";
348 case SSL3_ST_SR_FINISHED_A: 452 break;
453 case SSL3_ST_SR_FINISHED_A:
349 case SSL3_ST_CR_FINISHED_A: 454 case SSL3_ST_CR_FINISHED_A:
350 str="3RFINA"; break; 455 str = "3RFINA";
351 case SSL3_ST_SR_FINISHED_B: 456 break;
457 case SSL3_ST_SR_FINISHED_B:
352 case SSL3_ST_CR_FINISHED_B: 458 case SSL3_ST_CR_FINISHED_B:
353 str="3RFINB"; break; 459 str = "3RFINB";
460 break;
354 461
355 case SSL3_ST_SW_HELLO_REQ_A: 462 case SSL3_ST_SW_HELLO_REQ_A:
356 str="3WHR_A"; break; 463 str = "3WHR_A";
464 break;
357 case SSL3_ST_SW_HELLO_REQ_B: 465 case SSL3_ST_SW_HELLO_REQ_B:
358 str="3WHR_B"; break; 466 str = "3WHR_B";
467 break;
359 case SSL3_ST_SW_HELLO_REQ_C: 468 case SSL3_ST_SW_HELLO_REQ_C:
360 str="3WHR_C"; break; 469 str = "3WHR_C";
470 break;
361 case SSL3_ST_SR_CLNT_HELLO_A: 471 case SSL3_ST_SR_CLNT_HELLO_A:
362 str="3RCH_A"; break; 472 str = "3RCH_A";
473 break;
363 case SSL3_ST_SR_CLNT_HELLO_B: 474 case SSL3_ST_SR_CLNT_HELLO_B:
364 str="3RCH_B"; break; 475 str = "3RCH_B";
476 break;
365 case SSL3_ST_SR_CLNT_HELLO_C: 477 case SSL3_ST_SR_CLNT_HELLO_C:
366 str="3RCH_C"; break; 478 str = "3RCH_C";
479 break;
367 case SSL3_ST_SW_SRVR_HELLO_A: 480 case SSL3_ST_SW_SRVR_HELLO_A:
368 str="3WSH_A"; break; 481 str = "3WSH_A";
482 break;
369 case SSL3_ST_SW_SRVR_HELLO_B: 483 case SSL3_ST_SW_SRVR_HELLO_B:
370 str="3WSH_B"; break; 484 str = "3WSH_B";
485 break;
371 case SSL3_ST_SW_CERT_A: 486 case SSL3_ST_SW_CERT_A:
372 str="3WSC_A"; break; 487 str = "3WSC_A";
488 break;
373 case SSL3_ST_SW_CERT_B: 489 case SSL3_ST_SW_CERT_B:
374 str="3WSC_B"; break; 490 str = "3WSC_B";
491 break;
375 case SSL3_ST_SW_KEY_EXCH_A: 492 case SSL3_ST_SW_KEY_EXCH_A:
376 str="3WSKEA"; break; 493 str = "3WSKEA";
494 break;
377 case SSL3_ST_SW_KEY_EXCH_B: 495 case SSL3_ST_SW_KEY_EXCH_B:
378 str="3WSKEB"; break; 496 str = "3WSKEB";
497 break;
379 case SSL3_ST_SW_CERT_REQ_A: 498 case SSL3_ST_SW_CERT_REQ_A:
380 str="3WCR_A"; break; 499 str = "3WCR_A";
500 break;
381 case SSL3_ST_SW_CERT_REQ_B: 501 case SSL3_ST_SW_CERT_REQ_B:
382 str="3WCR_B"; break; 502 str = "3WCR_B";
503 break;
383 case SSL3_ST_SW_SRVR_DONE_A: 504 case SSL3_ST_SW_SRVR_DONE_A:
384 str="3WSD_A"; break; 505 str = "3WSD_A";
506 break;
385 case SSL3_ST_SW_SRVR_DONE_B: 507 case SSL3_ST_SW_SRVR_DONE_B:
386 str="3WSD_B"; break; 508 str = "3WSD_B";
509 break;
387 case SSL3_ST_SR_CERT_A: 510 case SSL3_ST_SR_CERT_A:
388 str="3RCC_A"; break; 511 str = "3RCC_A";
512 break;
389 case SSL3_ST_SR_CERT_B: 513 case SSL3_ST_SR_CERT_B:
390 str="3RCC_B"; break; 514 str = "3RCC_B";
515 break;
391 case SSL3_ST_SR_KEY_EXCH_A: 516 case SSL3_ST_SR_KEY_EXCH_A:
392 str="3RCKEA"; break; 517 str = "3RCKEA";
518 break;
393 case SSL3_ST_SR_KEY_EXCH_B: 519 case SSL3_ST_SR_KEY_EXCH_B:
394 str="3RCKEB"; break; 520 str = "3RCKEB";
521 break;
395 case SSL3_ST_SR_CERT_VRFY_A: 522 case SSL3_ST_SR_CERT_VRFY_A:
396 str="3RCV_A"; break; 523 str = "3RCV_A";
524 break;
397 case SSL3_ST_SR_CERT_VRFY_B: 525 case SSL3_ST_SR_CERT_VRFY_B:
398 str="3RCV_B"; break; 526 str = "3RCV_B";
399/* DTLS */ 527 break;
528
529 /* DTLS */
400 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: 530 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
401 str="DRCHVA"; break; 531 str = "DRCHVA";
532 break;
402 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: 533 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
403 str="DRCHVB"; break; 534 str = "DRCHVB";
535 break;
404 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: 536 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
405 str="DWCHVA"; break; 537 str = "DWCHVA";
538 break;
406 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: 539 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
407 str="DWCHVB"; break; 540 str = "DWCHVB";
541 break;
408 542
409 default: 543 default:
410 str="UNKWN "; break; 544 str = "UNKWN ";
545 break;
411 } 546 }
412 return (str); 547 return (str);
413} 548}
@@ -415,25 +550,25 @@ SSL_state_string(const SSL *s)
415const char * 550const char *
416SSL_alert_type_string_long(int value) 551SSL_alert_type_string_long(int value)
417{ 552{
418 value>>=8; 553 value >>= 8;
419 if (value == SSL3_AL_WARNING) 554 if (value == SSL3_AL_WARNING)
420 return("warning"); 555 return ("warning");
421 else if (value == SSL3_AL_FATAL) 556 else if (value == SSL3_AL_FATAL)
422 return("fatal"); 557 return ("fatal");
423 else 558 else
424 return("unknown"); 559 return ("unknown");
425} 560}
426 561
427const char * 562const char *
428SSL_alert_type_string(int value) 563SSL_alert_type_string(int value)
429{ 564{
430 value>>=8; 565 value >>= 8;
431 if (value == SSL3_AL_WARNING) 566 if (value == SSL3_AL_WARNING)
432 return("W"); 567 return ("W");
433 else if (value == SSL3_AL_FATAL) 568 else if (value == SSL3_AL_FATAL)
434 return("F"); 569 return ("F");
435 else 570 else
436 return("U"); 571 return ("U");
437} 572}
438 573
439const char * 574const char *
@@ -443,67 +578,98 @@ SSL_alert_desc_string(int value)
443 578
444 switch (value & 0xff) { 579 switch (value & 0xff) {
445 case SSL3_AD_CLOSE_NOTIFY: 580 case SSL3_AD_CLOSE_NOTIFY:
446 str="CN"; break; 581 str = "CN";
582 break;
447 case SSL3_AD_UNEXPECTED_MESSAGE: 583 case SSL3_AD_UNEXPECTED_MESSAGE:
448 str="UM"; break; 584 str = "UM";
585 break;
449 case SSL3_AD_BAD_RECORD_MAC: 586 case SSL3_AD_BAD_RECORD_MAC:
450 str="BM"; break; 587 str = "BM";
588 break;
451 case SSL3_AD_DECOMPRESSION_FAILURE: 589 case SSL3_AD_DECOMPRESSION_FAILURE:
452 str="DF"; break; 590 str = "DF";
591 break;
453 case SSL3_AD_HANDSHAKE_FAILURE: 592 case SSL3_AD_HANDSHAKE_FAILURE:
454 str="HF"; break; 593 str = "HF";
594 break;
455 case SSL3_AD_NO_CERTIFICATE: 595 case SSL3_AD_NO_CERTIFICATE:
456 str="NC"; break; 596 str = "NC";
597 break;
457 case SSL3_AD_BAD_CERTIFICATE: 598 case SSL3_AD_BAD_CERTIFICATE:
458 str="BC"; break; 599 str = "BC";
600 break;
459 case SSL3_AD_UNSUPPORTED_CERTIFICATE: 601 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
460 str="UC"; break; 602 str = "UC";
603 break;
461 case SSL3_AD_CERTIFICATE_REVOKED: 604 case SSL3_AD_CERTIFICATE_REVOKED:
462 str="CR"; break; 605 str = "CR";
606 break;
463 case SSL3_AD_CERTIFICATE_EXPIRED: 607 case SSL3_AD_CERTIFICATE_EXPIRED:
464 str="CE"; break; 608 str = "CE";
609 break;
465 case SSL3_AD_CERTIFICATE_UNKNOWN: 610 case SSL3_AD_CERTIFICATE_UNKNOWN:
466 str="CU"; break; 611 str = "CU";
612 break;
467 case SSL3_AD_ILLEGAL_PARAMETER: 613 case SSL3_AD_ILLEGAL_PARAMETER:
468 str="IP"; break; 614 str = "IP";
615 break;
469 case TLS1_AD_DECRYPTION_FAILED: 616 case TLS1_AD_DECRYPTION_FAILED:
470 str="DC"; break; 617 str = "DC";
618 break;
471 case TLS1_AD_RECORD_OVERFLOW: 619 case TLS1_AD_RECORD_OVERFLOW:
472 str="RO"; break; 620 str = "RO";
621 break;
473 case TLS1_AD_UNKNOWN_CA: 622 case TLS1_AD_UNKNOWN_CA:
474 str="CA"; break; 623 str = "CA";
624 break;
475 case TLS1_AD_ACCESS_DENIED: 625 case TLS1_AD_ACCESS_DENIED:
476 str="AD"; break; 626 str = "AD";
627 break;
477 case TLS1_AD_DECODE_ERROR: 628 case TLS1_AD_DECODE_ERROR:
478 str="DE"; break; 629 str = "DE";
630 break;
479 case TLS1_AD_DECRYPT_ERROR: 631 case TLS1_AD_DECRYPT_ERROR:
480 str="CY"; break; 632 str = "CY";
633 break;
481 case TLS1_AD_EXPORT_RESTRICTION: 634 case TLS1_AD_EXPORT_RESTRICTION:
482 str="ER"; break; 635 str = "ER";
636 break;
483 case TLS1_AD_PROTOCOL_VERSION: 637 case TLS1_AD_PROTOCOL_VERSION:
484 str="PV"; break; 638 str = "PV";
639 break;
485 case TLS1_AD_INSUFFICIENT_SECURITY: 640 case TLS1_AD_INSUFFICIENT_SECURITY:
486 str="IS"; break; 641 str = "IS";
642 break;
487 case TLS1_AD_INTERNAL_ERROR: 643 case TLS1_AD_INTERNAL_ERROR:
488 str="IE"; break; 644 str = "IE";
645 break;
489 case TLS1_AD_USER_CANCELLED: 646 case TLS1_AD_USER_CANCELLED:
490 str="US"; break; 647 str = "US";
648 break;
491 case TLS1_AD_NO_RENEGOTIATION: 649 case TLS1_AD_NO_RENEGOTIATION:
492 str="NR"; break; 650 str = "NR";
651 break;
493 case TLS1_AD_UNSUPPORTED_EXTENSION: 652 case TLS1_AD_UNSUPPORTED_EXTENSION:
494 str="UE"; break; 653 str = "UE";
654 break;
495 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: 655 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
496 str="CO"; break; 656 str = "CO";
657 break;
497 case TLS1_AD_UNRECOGNIZED_NAME: 658 case TLS1_AD_UNRECOGNIZED_NAME:
498 str="UN"; break; 659 str = "UN";
660 break;
499 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: 661 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
500 str="BR"; break; 662 str = "BR";
663 break;
501 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: 664 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
502 str="BH"; break; 665 str = "BH";
666 break;
503 case TLS1_AD_UNKNOWN_PSK_IDENTITY: 667 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
504 str="UP"; break; 668 str = "UP";
669 break;
505 default: 670 default:
506 str="UK"; break; 671 str = "UK";
672 break;
507 } 673 }
508 return (str); 674 return (str);
509} 675}
@@ -515,97 +681,98 @@ SSL_alert_desc_string_long(int value)
515 681
516 switch (value & 0xff) { 682 switch (value & 0xff) {
517 case SSL3_AD_CLOSE_NOTIFY: 683 case SSL3_AD_CLOSE_NOTIFY:
518 str="close notify"; 684 str = "close notify";
519 break; 685 break;
520 case SSL3_AD_UNEXPECTED_MESSAGE: 686 case SSL3_AD_UNEXPECTED_MESSAGE:
521 str="unexpected_message"; 687 str = "unexpected_message";
522 break; 688 break;
523 case SSL3_AD_BAD_RECORD_MAC: 689 case SSL3_AD_BAD_RECORD_MAC:
524 str="bad record mac"; 690 str = "bad record mac";
525 break; 691 break;
526 case SSL3_AD_DECOMPRESSION_FAILURE: 692 case SSL3_AD_DECOMPRESSION_FAILURE:
527 str="decompression failure"; 693 str = "decompression failure";
528 break; 694 break;
529 case SSL3_AD_HANDSHAKE_FAILURE: 695 case SSL3_AD_HANDSHAKE_FAILURE:
530 str="handshake failure"; 696 str = "handshake failure";
531 break; 697 break;
532 case SSL3_AD_NO_CERTIFICATE: 698 case SSL3_AD_NO_CERTIFICATE:
533 str="no certificate"; 699 str = "no certificate";
534 break; 700 break;
535 case SSL3_AD_BAD_CERTIFICATE: 701 case SSL3_AD_BAD_CERTIFICATE:
536 str="bad certificate"; 702 str = "bad certificate";
537 break; 703 break;
538 case SSL3_AD_UNSUPPORTED_CERTIFICATE: 704 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
539 str="unsupported certificate"; 705 str = "unsupported certificate";
540 break; 706 break;
541 case SSL3_AD_CERTIFICATE_REVOKED: 707 case SSL3_AD_CERTIFICATE_REVOKED:
542 str="certificate revoked"; 708 str = "certificate revoked";
543 break; 709 break;
544 case SSL3_AD_CERTIFICATE_EXPIRED: 710 case SSL3_AD_CERTIFICATE_EXPIRED:
545 str="certificate expired"; 711 str = "certificate expired";
546 break; 712 break;
547 case SSL3_AD_CERTIFICATE_UNKNOWN: 713 case SSL3_AD_CERTIFICATE_UNKNOWN:
548 str="certificate unknown"; 714 str = "certificate unknown";
549 break; 715 break;
550 case SSL3_AD_ILLEGAL_PARAMETER: 716 case SSL3_AD_ILLEGAL_PARAMETER:
551 str="illegal parameter"; 717 str = "illegal parameter";
552 break; 718 break;
553 case TLS1_AD_DECRYPTION_FAILED: 719 case TLS1_AD_DECRYPTION_FAILED:
554 str="decryption failed"; 720 str = "decryption failed";
555 break; 721 break;
556 case TLS1_AD_RECORD_OVERFLOW: 722 case TLS1_AD_RECORD_OVERFLOW:
557 str="record overflow"; 723 str = "record overflow";
558 break; 724 break;
559 case TLS1_AD_UNKNOWN_CA: 725 case TLS1_AD_UNKNOWN_CA:
560 str="unknown CA"; 726 str = "unknown CA";
561 break; 727 break;
562 case TLS1_AD_ACCESS_DENIED: 728 case TLS1_AD_ACCESS_DENIED:
563 str="access denied"; 729 str = "access denied";
564 break; 730 break;
565 case TLS1_AD_DECODE_ERROR: 731 case TLS1_AD_DECODE_ERROR:
566 str="decode error"; 732 str = "decode error";
567 break; 733 break;
568 case TLS1_AD_DECRYPT_ERROR: 734 case TLS1_AD_DECRYPT_ERROR:
569 str="decrypt error"; 735 str = "decrypt error";
570 break; 736 break;
571 case TLS1_AD_EXPORT_RESTRICTION: 737 case TLS1_AD_EXPORT_RESTRICTION:
572 str="export restriction"; 738 str = "export restriction";
573 break; 739 break;
574 case TLS1_AD_PROTOCOL_VERSION: 740 case TLS1_AD_PROTOCOL_VERSION:
575 str="protocol version"; 741 str = "protocol version";
576 break; 742 break;
577 case TLS1_AD_INSUFFICIENT_SECURITY: 743 case TLS1_AD_INSUFFICIENT_SECURITY:
578 str="insufficient security"; 744 str = "insufficient security";
579 break; 745 break;
580 case TLS1_AD_INTERNAL_ERROR: 746 case TLS1_AD_INTERNAL_ERROR:
581 str="internal error"; 747 str = "internal error";
582 break; 748 break;
583 case TLS1_AD_USER_CANCELLED: 749 case TLS1_AD_USER_CANCELLED:
584 str="user canceled"; 750 str = "user canceled";
585 break; 751 break;
586 case TLS1_AD_NO_RENEGOTIATION: 752 case TLS1_AD_NO_RENEGOTIATION:
587 str="no renegotiation"; 753 str = "no renegotiation";
588 break; 754 break;
589 case TLS1_AD_UNSUPPORTED_EXTENSION: 755 case TLS1_AD_UNSUPPORTED_EXTENSION:
590 str="unsupported extension"; 756 str = "unsupported extension";
591 break; 757 break;
592 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: 758 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
593 str="certificate unobtainable"; 759 str = "certificate unobtainable";
594 break; 760 break;
595 case TLS1_AD_UNRECOGNIZED_NAME: 761 case TLS1_AD_UNRECOGNIZED_NAME:
596 str="unrecognized name"; 762 str = "unrecognized name";
597 break; 763 break;
598 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: 764 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
599 str="bad certificate status response"; 765 str = "bad certificate status response";
600 break; 766 break;
601 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: 767 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
602 str="bad certificate hash value"; 768 str = "bad certificate hash value";
603 break; 769 break;
604 case TLS1_AD_UNKNOWN_PSK_IDENTITY: 770 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
605 str="unknown PSK identity"; 771 str = "unknown PSK identity";
606 break; 772 break;
607 default: 773 default:
608 str="unknown"; break; 774 str = "unknown";
775 break;
609 } 776 }
610 return (str); 777 return (str);
611} 778}
@@ -617,13 +784,17 @@ SSL_rstate_string(const SSL *s)
617 784
618 switch (s->rstate) { 785 switch (s->rstate) {
619 case SSL_ST_READ_HEADER: 786 case SSL_ST_READ_HEADER:
620 str="RH"; break; 787 str = "RH";
788 break;
621 case SSL_ST_READ_BODY: 789 case SSL_ST_READ_BODY:
622 str="RB"; break; 790 str = "RB";
791 break;
623 case SSL_ST_READ_DONE: 792 case SSL_ST_READ_DONE:
624 str="RD"; break; 793 str = "RD";
794 break;
625 default: 795 default:
626 str="unknown"; break; 796 str = "unknown";
797 break;
627 } 798 }
628 return (str); 799 return (str);
629} 800}