2 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
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
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
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.
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.
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
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:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
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
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
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
58 /* ====================================================================
59 * Copyright 2005 Nokia. All rights reserved.
61 * The portions of the attached software ("Contribution") is developed by
62 * Nokia Corporation and is licensed pursuant to the OpenSSL open source
65 * The Contribution, originally written by Mika Kousa and Pasi Eronen of
66 * Nokia Corporation, consists of the "PSK" (Pre-Shared Key) ciphersuites
67 * support (see RFC 4279) to OpenSSL.
69 * No patent licenses or other rights except those expressly stated in
70 * the OpenSSL open source license shall be deemed granted or received
71 * expressly, by implication, estoppel, or otherwise.
73 * No assurances are provided by Nokia that the Contribution does not
74 * infringe the patent or other intellectual property rights of any third
75 * party or that the license provides you with all the necessary rights
76 * to make use of the Contribution.
78 * THE SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. IN
79 * ADDITION TO THE DISCLAIMERS INCLUDED IN THE LICENSE, NOKIA
80 * SPECIFICALLY DISCLAIMS ANY LIABILITY FOR CLAIMS BROUGHT BY YOU OR ANY
81 * OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OR
88 const char *SSL_state_string_long(const SSL *s)
94 case SSL_ST_BEFORE: str="before SSL initialization"; break;
95 case SSL_ST_ACCEPT: str="before accept initialization"; break;
96 case SSL_ST_CONNECT: str="before connect initialization"; break;
97 case SSL_ST_OK: str="SSL negotiation finished successfully"; break;
98 case SSL_ST_RENEGOTIATE: str="SSL renegotiate ciphers"; break;
99 case SSL_ST_BEFORE|SSL_ST_CONNECT: str="before/connect initialization"; break;
100 case SSL_ST_OK|SSL_ST_CONNECT: str="ok/connect SSL initialization"; break;
101 case SSL_ST_BEFORE|SSL_ST_ACCEPT: str="before/accept initialization"; break;
102 case SSL_ST_OK|SSL_ST_ACCEPT: str="ok/accept SSL initialization"; break;
104 #ifndef OPENSSL_NO_SSL3
105 /* SSLv3 additions */
106 case SSL3_ST_CW_CLNT_HELLO_A: str="SSLv3 write client hello A"; break;
107 case SSL3_ST_CW_CLNT_HELLO_B: str="SSLv3 write client hello B"; break;
108 case SSL3_ST_CR_SRVR_HELLO_A: str="SSLv3 read server hello A"; break;
109 case SSL3_ST_CR_SRVR_HELLO_B: str="SSLv3 read server hello B"; break;
110 case SSL3_ST_CR_CERT_A: str="SSLv3 read server certificate A"; break;
111 case SSL3_ST_CR_CERT_B: str="SSLv3 read server certificate B"; break;
112 case SSL3_ST_CR_KEY_EXCH_A: str="SSLv3 read server key exchange A"; break;
113 case SSL3_ST_CR_KEY_EXCH_B: str="SSLv3 read server key exchange B"; break;
114 case SSL3_ST_CR_CERT_REQ_A: str="SSLv3 read server certificate request A"; break;
115 case SSL3_ST_CR_CERT_REQ_B: str="SSLv3 read server certificate request B"; break;
116 case SSL3_ST_CR_SESSION_TICKET_A: str="SSLv3 read server session ticket A";break;
117 case SSL3_ST_CR_SESSION_TICKET_B: str="SSLv3 read server session ticket B";break;
118 case SSL3_ST_CR_SRVR_DONE_A: str="SSLv3 read server done A"; break;
119 case SSL3_ST_CR_SRVR_DONE_B: str="SSLv3 read server done B"; break;
120 case SSL3_ST_CW_CERT_A: str="SSLv3 write client certificate A"; break;
121 case SSL3_ST_CW_CERT_B: str="SSLv3 write client certificate B"; break;
122 case SSL3_ST_CW_CERT_C: str="SSLv3 write client certificate C"; break;
123 case SSL3_ST_CW_CERT_D: str="SSLv3 write client certificate D"; break;
124 case SSL3_ST_CW_KEY_EXCH_A: str="SSLv3 write client key exchange A"; break;
125 case SSL3_ST_CW_KEY_EXCH_B: str="SSLv3 write client key exchange B"; break;
126 case SSL3_ST_CW_CERT_VRFY_A: str="SSLv3 write certificate verify A"; break;
127 case SSL3_ST_CW_CERT_VRFY_B: str="SSLv3 write certificate verify B"; break;
129 case SSL3_ST_CW_CHANGE_A:
130 case SSL3_ST_SW_CHANGE_A: str="SSLv3 write change cipher spec A"; break;
131 case SSL3_ST_CW_CHANGE_B:
132 case SSL3_ST_SW_CHANGE_B: str="SSLv3 write change cipher spec B"; break;
133 case SSL3_ST_CW_FINISHED_A:
134 case SSL3_ST_SW_FINISHED_A: str="SSLv3 write finished A"; break;
135 case SSL3_ST_CW_FINISHED_B:
136 case SSL3_ST_SW_FINISHED_B: str="SSLv3 write finished B"; break;
137 case SSL3_ST_CR_CHANGE_A:
138 case SSL3_ST_SR_CHANGE_A: str="SSLv3 read change cipher spec A"; break;
139 case SSL3_ST_CR_CHANGE_B:
140 case SSL3_ST_SR_CHANGE_B: str="SSLv3 read change cipher spec B"; break;
141 case SSL3_ST_CR_FINISHED_A:
142 case SSL3_ST_SR_FINISHED_A: str="SSLv3 read finished A"; break;
143 case SSL3_ST_CR_FINISHED_B:
144 case SSL3_ST_SR_FINISHED_B: str="SSLv3 read finished B"; break;
146 case SSL3_ST_CW_FLUSH:
147 case SSL3_ST_SW_FLUSH: str="SSLv3 flush data"; break;
149 case SSL3_ST_SR_CLNT_HELLO_A: str="SSLv3 read client hello A"; break;
150 case SSL3_ST_SR_CLNT_HELLO_B: str="SSLv3 read client hello B"; break;
151 case SSL3_ST_SR_CLNT_HELLO_C: str="SSLv3 read client hello C"; break;
152 case SSL3_ST_SW_HELLO_REQ_A: str="SSLv3 write hello request A"; break;
153 case SSL3_ST_SW_HELLO_REQ_B: str="SSLv3 write hello request B"; break;
154 case SSL3_ST_SW_HELLO_REQ_C: str="SSLv3 write hello request C"; break;
155 case SSL3_ST_SW_SRVR_HELLO_A: str="SSLv3 write server hello A"; break;
156 case SSL3_ST_SW_SRVR_HELLO_B: str="SSLv3 write server hello B"; break;
157 case SSL3_ST_SW_CERT_A: str="SSLv3 write certificate A"; break;
158 case SSL3_ST_SW_CERT_B: str="SSLv3 write certificate B"; break;
159 case SSL3_ST_SW_KEY_EXCH_A: str="SSLv3 write key exchange A"; break;
160 case SSL3_ST_SW_KEY_EXCH_B: str="SSLv3 write key exchange B"; break;
161 case SSL3_ST_SW_CERT_REQ_A: str="SSLv3 write certificate request A"; break;
162 case SSL3_ST_SW_CERT_REQ_B: str="SSLv3 write certificate request B"; break;
163 case SSL3_ST_SW_SESSION_TICKET_A: str="SSLv3 write session ticket A"; break;
164 case SSL3_ST_SW_SESSION_TICKET_B: str="SSLv3 write session ticket B"; break;
165 case SSL3_ST_SW_SRVR_DONE_A: str="SSLv3 write server done A"; break;
166 case SSL3_ST_SW_SRVR_DONE_B: str="SSLv3 write server done B"; break;
167 case SSL3_ST_SR_CERT_A: str="SSLv3 read client certificate A"; break;
168 case SSL3_ST_SR_CERT_B: str="SSLv3 read client certificate B"; break;
169 case SSL3_ST_SR_KEY_EXCH_A: str="SSLv3 read client key exchange A"; break;
170 case SSL3_ST_SR_KEY_EXCH_B: str="SSLv3 read client key exchange B"; break;
171 case SSL3_ST_SR_CERT_VRFY_A: str="SSLv3 read certificate verify A"; break;
172 case SSL3_ST_SR_CERT_VRFY_B: str="SSLv3 read certificate verify B"; break;
175 /* SSLv2/v3 compatibility states */
177 case SSL23_ST_CW_CLNT_HELLO_A: str="SSLv2/v3 write client hello A"; break;
178 case SSL23_ST_CW_CLNT_HELLO_B: str="SSLv2/v3 write client hello B"; break;
179 case SSL23_ST_CR_SRVR_HELLO_A: str="SSLv2/v3 read server hello A"; break;
180 case SSL23_ST_CR_SRVR_HELLO_B: str="SSLv2/v3 read server hello B"; break;
182 case SSL23_ST_SR_CLNT_HELLO_A: str="SSLv2/v3 read client hello A"; break;
183 case SSL23_ST_SR_CLNT_HELLO_B: str="SSLv2/v3 read client hello B"; break;
186 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: str="DTLS1 read hello verify request A"; break;
187 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: str="DTLS1 read hello verify request B"; break;
188 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: str="DTLS1 write hello verify request A"; break;
189 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: str="DTLS1 write hello verify request B"; break;
191 default: str="unknown state"; break;
196 const char *SSL_rstate_string_long(const SSL *s)
202 case SSL_ST_READ_HEADER: str="read header"; break;
203 case SSL_ST_READ_BODY: str="read body"; break;
204 case SSL_ST_READ_DONE: str="read done"; break;
205 default: str="unknown"; break;
210 const char *SSL_state_string(const SSL *s)
216 case SSL_ST_BEFORE: str="PINIT "; break;
217 case SSL_ST_ACCEPT: str="AINIT "; break;
218 case SSL_ST_CONNECT: str="CINIT "; break;
219 case SSL_ST_OK: str="SSLOK "; break;
221 #ifndef OPENSSL_NO_SSL3
222 /* SSLv3 additions */
223 case SSL3_ST_SW_FLUSH:
224 case SSL3_ST_CW_FLUSH: str="3FLUSH"; break;
225 case SSL3_ST_CW_CLNT_HELLO_A: str="3WCH_A"; break;
226 case SSL3_ST_CW_CLNT_HELLO_B: str="3WCH_B"; break;
227 case SSL3_ST_CR_SRVR_HELLO_A: str="3RSH_A"; break;
228 case SSL3_ST_CR_SRVR_HELLO_B: str="3RSH_B"; break;
229 case SSL3_ST_CR_CERT_A: str="3RSC_A"; break;
230 case SSL3_ST_CR_CERT_B: str="3RSC_B"; break;
231 case SSL3_ST_CR_KEY_EXCH_A: str="3RSKEA"; break;
232 case SSL3_ST_CR_KEY_EXCH_B: str="3RSKEB"; break;
233 case SSL3_ST_CR_CERT_REQ_A: str="3RCR_A"; break;
234 case SSL3_ST_CR_CERT_REQ_B: str="3RCR_B"; break;
235 case SSL3_ST_CR_SRVR_DONE_A: str="3RSD_A"; break;
236 case SSL3_ST_CR_SRVR_DONE_B: str="3RSD_B"; break;
237 case SSL3_ST_CW_CERT_A: str="3WCC_A"; break;
238 case SSL3_ST_CW_CERT_B: str="3WCC_B"; break;
239 case SSL3_ST_CW_CERT_C: str="3WCC_C"; break;
240 case SSL3_ST_CW_CERT_D: str="3WCC_D"; break;
241 case SSL3_ST_CW_KEY_EXCH_A: str="3WCKEA"; break;
242 case SSL3_ST_CW_KEY_EXCH_B: str="3WCKEB"; break;
243 case SSL3_ST_CW_CERT_VRFY_A: str="3WCV_A"; break;
244 case SSL3_ST_CW_CERT_VRFY_B: str="3WCV_B"; break;
246 case SSL3_ST_SW_CHANGE_A:
247 case SSL3_ST_CW_CHANGE_A: str="3WCCSA"; break;
248 case SSL3_ST_SW_CHANGE_B:
249 case SSL3_ST_CW_CHANGE_B: str="3WCCSB"; break;
250 case SSL3_ST_SW_FINISHED_A:
251 case SSL3_ST_CW_FINISHED_A: str="3WFINA"; break;
252 case SSL3_ST_SW_FINISHED_B:
253 case SSL3_ST_CW_FINISHED_B: str="3WFINB"; break;
254 case SSL3_ST_SR_CHANGE_A:
255 case SSL3_ST_CR_CHANGE_A: str="3RCCSA"; break;
256 case SSL3_ST_SR_CHANGE_B:
257 case SSL3_ST_CR_CHANGE_B: str="3RCCSB"; break;
258 case SSL3_ST_SR_FINISHED_A:
259 case SSL3_ST_CR_FINISHED_A: str="3RFINA"; break;
260 case SSL3_ST_SR_FINISHED_B:
261 case SSL3_ST_CR_FINISHED_B: str="3RFINB"; break;
263 case SSL3_ST_SW_HELLO_REQ_A: str="3WHR_A"; break;
264 case SSL3_ST_SW_HELLO_REQ_B: str="3WHR_B"; break;
265 case SSL3_ST_SW_HELLO_REQ_C: str="3WHR_C"; break;
266 case SSL3_ST_SR_CLNT_HELLO_A: str="3RCH_A"; break;
267 case SSL3_ST_SR_CLNT_HELLO_B: str="3RCH_B"; break;
268 case SSL3_ST_SR_CLNT_HELLO_C: str="3RCH_C"; break;
269 case SSL3_ST_SW_SRVR_HELLO_A: str="3WSH_A"; break;
270 case SSL3_ST_SW_SRVR_HELLO_B: str="3WSH_B"; break;
271 case SSL3_ST_SW_CERT_A: str="3WSC_A"; break;
272 case SSL3_ST_SW_CERT_B: str="3WSC_B"; break;
273 case SSL3_ST_SW_KEY_EXCH_A: str="3WSKEA"; break;
274 case SSL3_ST_SW_KEY_EXCH_B: str="3WSKEB"; break;
275 case SSL3_ST_SW_CERT_REQ_A: str="3WCR_A"; break;
276 case SSL3_ST_SW_CERT_REQ_B: str="3WCR_B"; break;
277 case SSL3_ST_SW_SRVR_DONE_A: str="3WSD_A"; break;
278 case SSL3_ST_SW_SRVR_DONE_B: str="3WSD_B"; break;
279 case SSL3_ST_SR_CERT_A: str="3RCC_A"; break;
280 case SSL3_ST_SR_CERT_B: str="3RCC_B"; break;
281 case SSL3_ST_SR_KEY_EXCH_A: str="3RCKEA"; break;
282 case SSL3_ST_SR_KEY_EXCH_B: str="3RCKEB"; break;
283 case SSL3_ST_SR_CERT_VRFY_A: str="3RCV_A"; break;
284 case SSL3_ST_SR_CERT_VRFY_B: str="3RCV_B"; break;
287 /* SSLv2/v3 compatibility states */
289 case SSL23_ST_CW_CLNT_HELLO_A: str="23WCHA"; break;
290 case SSL23_ST_CW_CLNT_HELLO_B: str="23WCHB"; break;
291 case SSL23_ST_CR_SRVR_HELLO_A: str="23RSHA"; break;
292 case SSL23_ST_CR_SRVR_HELLO_B: str="23RSHA"; break;
294 case SSL23_ST_SR_CLNT_HELLO_A: str="23RCHA"; break;
295 case SSL23_ST_SR_CLNT_HELLO_B: str="23RCHB"; break;
298 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A: str="DRCHVA"; break;
299 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B: str="DRCHVB"; break;
300 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A: str="DWCHVA"; break;
301 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B: str="DWCHVB"; break;
303 default: str="UNKWN "; break;
308 const char *SSL_alert_type_string_long(int value)
311 if (value == SSL3_AL_WARNING)
313 else if (value == SSL3_AL_FATAL)
319 const char *SSL_alert_type_string(int value)
322 if (value == SSL3_AL_WARNING)
324 else if (value == SSL3_AL_FATAL)
330 const char *SSL_alert_desc_string(int value)
334 switch (value & 0xff)
336 case SSL3_AD_CLOSE_NOTIFY: str="CN"; break;
337 case SSL3_AD_UNEXPECTED_MESSAGE: str="UM"; break;
338 case SSL3_AD_BAD_RECORD_MAC: str="BM"; break;
339 case SSL3_AD_DECOMPRESSION_FAILURE: str="DF"; break;
340 case SSL3_AD_HANDSHAKE_FAILURE: str="HF"; break;
341 case SSL3_AD_NO_CERTIFICATE: str="NC"; break;
342 case SSL3_AD_BAD_CERTIFICATE: str="BC"; break;
343 case SSL3_AD_UNSUPPORTED_CERTIFICATE: str="UC"; break;
344 case SSL3_AD_CERTIFICATE_REVOKED: str="CR"; break;
345 case SSL3_AD_CERTIFICATE_EXPIRED: str="CE"; break;
346 case SSL3_AD_CERTIFICATE_UNKNOWN: str="CU"; break;
347 case SSL3_AD_ILLEGAL_PARAMETER: str="IP"; break;
348 case TLS1_AD_DECRYPTION_FAILED: str="DC"; break;
349 case TLS1_AD_RECORD_OVERFLOW: str="RO"; break;
350 case TLS1_AD_UNKNOWN_CA: str="CA"; break;
351 case TLS1_AD_ACCESS_DENIED: str="AD"; break;
352 case TLS1_AD_DECODE_ERROR: str="DE"; break;
353 case TLS1_AD_DECRYPT_ERROR: str="CY"; break;
354 case TLS1_AD_EXPORT_RESTRICTION: str="ER"; break;
355 case TLS1_AD_PROTOCOL_VERSION: str="PV"; break;
356 case TLS1_AD_INSUFFICIENT_SECURITY: str="IS"; break;
357 case TLS1_AD_INTERNAL_ERROR: str="IE"; break;
358 case TLS1_AD_USER_CANCELLED: str="US"; break;
359 case TLS1_AD_NO_RENEGOTIATION: str="NR"; break;
360 case TLS1_AD_UNSUPPORTED_EXTENSION: str="UE"; break;
361 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: str="CO"; break;
362 case TLS1_AD_UNRECOGNIZED_NAME: str="UN"; break;
363 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: str="BR"; break;
364 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: str="BH"; break;
365 case TLS1_AD_UNKNOWN_PSK_IDENTITY: str="UP"; break;
366 default: str="UK"; break;
371 const char *SSL_alert_desc_string_long(int value)
375 switch (value & 0xff)
377 case SSL3_AD_CLOSE_NOTIFY:
380 case SSL3_AD_UNEXPECTED_MESSAGE:
381 str="unexpected_message";
383 case SSL3_AD_BAD_RECORD_MAC:
384 str="bad record mac";
386 case SSL3_AD_DECOMPRESSION_FAILURE:
387 str="decompression failure";
389 case SSL3_AD_HANDSHAKE_FAILURE:
390 str="handshake failure";
392 case SSL3_AD_NO_CERTIFICATE:
393 str="no certificate";
395 case SSL3_AD_BAD_CERTIFICATE:
396 str="bad certificate";
398 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
399 str="unsupported certificate";
401 case SSL3_AD_CERTIFICATE_REVOKED:
402 str="certificate revoked";
404 case SSL3_AD_CERTIFICATE_EXPIRED:
405 str="certificate expired";
407 case SSL3_AD_CERTIFICATE_UNKNOWN:
408 str="certificate unknown";
410 case SSL3_AD_ILLEGAL_PARAMETER:
411 str="illegal parameter";
413 case TLS1_AD_DECRYPTION_FAILED:
414 str="decryption failed";
416 case TLS1_AD_RECORD_OVERFLOW:
417 str="record overflow";
419 case TLS1_AD_UNKNOWN_CA:
422 case TLS1_AD_ACCESS_DENIED:
425 case TLS1_AD_DECODE_ERROR:
428 case TLS1_AD_DECRYPT_ERROR:
431 case TLS1_AD_EXPORT_RESTRICTION:
432 str="export restriction";
434 case TLS1_AD_PROTOCOL_VERSION:
435 str="protocol version";
437 case TLS1_AD_INSUFFICIENT_SECURITY:
438 str="insufficient security";
440 case TLS1_AD_INTERNAL_ERROR:
441 str="internal error";
443 case TLS1_AD_USER_CANCELLED:
446 case TLS1_AD_NO_RENEGOTIATION:
447 str="no renegotiation";
449 case TLS1_AD_UNSUPPORTED_EXTENSION:
450 str="unsupported extension";
452 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
453 str="certificate unobtainable";
455 case TLS1_AD_UNRECOGNIZED_NAME:
456 str="unrecognized name";
458 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
459 str="bad certificate status response";
461 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
462 str="bad certificate hash value";
464 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
465 str="unknown PSK identity";
467 default: str="unknown"; break;
472 const char *SSL_rstate_string(const SSL *s)
478 case SSL_ST_READ_HEADER:str="RH"; break;
479 case SSL_ST_READ_BODY: str="RB"; break;
480 case SSL_ST_READ_DONE: str="RD"; break;
481 default: str="unknown"; break;