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.]
62 const char *SSL_state_string_long(const SSL *s)
68 str = "before SSL initialization";
71 str = "before accept initialization";
74 str = "before connect initialization";
77 str = "SSL negotiation finished successfully";
79 case SSL_ST_RENEGOTIATE:
80 str = "SSL renegotiate ciphers";
82 case SSL_ST_BEFORE | SSL_ST_CONNECT:
83 str = "before/connect initialization";
85 case SSL_ST_OK | SSL_ST_CONNECT:
86 str = "ok/connect SSL initialization";
88 case SSL_ST_BEFORE | SSL_ST_ACCEPT:
89 str = "before/accept initialization";
91 case SSL_ST_OK | SSL_ST_ACCEPT:
92 str = "ok/accept SSL initialization";
94 #ifndef OPENSSL_NO_SSL2
95 case SSL2_ST_CLIENT_START_ENCRYPTION:
96 str = "SSLv2 client start encryption";
98 case SSL2_ST_SERVER_START_ENCRYPTION:
99 str = "SSLv2 server start encryption";
101 case SSL2_ST_SEND_CLIENT_HELLO_A:
102 str = "SSLv2 write client hello A";
104 case SSL2_ST_SEND_CLIENT_HELLO_B:
105 str = "SSLv2 write client hello B";
107 case SSL2_ST_GET_SERVER_HELLO_A:
108 str = "SSLv2 read server hello A";
110 case SSL2_ST_GET_SERVER_HELLO_B:
111 str = "SSLv2 read server hello B";
113 case SSL2_ST_SEND_CLIENT_MASTER_KEY_A:
114 str = "SSLv2 write client master key A";
116 case SSL2_ST_SEND_CLIENT_MASTER_KEY_B:
117 str = "SSLv2 write client master key B";
119 case SSL2_ST_SEND_CLIENT_FINISHED_A:
120 str = "SSLv2 write client finished A";
122 case SSL2_ST_SEND_CLIENT_FINISHED_B:
123 str = "SSLv2 write client finished B";
125 case SSL2_ST_SEND_CLIENT_CERTIFICATE_A:
126 str = "SSLv2 write client certificate A";
128 case SSL2_ST_SEND_CLIENT_CERTIFICATE_B:
129 str = "SSLv2 write client certificate B";
131 case SSL2_ST_SEND_CLIENT_CERTIFICATE_C:
132 str = "SSLv2 write client certificate C";
134 case SSL2_ST_SEND_CLIENT_CERTIFICATE_D:
135 str = "SSLv2 write client certificate D";
137 case SSL2_ST_GET_SERVER_VERIFY_A:
138 str = "SSLv2 read server verify A";
140 case SSL2_ST_GET_SERVER_VERIFY_B:
141 str = "SSLv2 read server verify B";
143 case SSL2_ST_GET_SERVER_FINISHED_A:
144 str = "SSLv2 read server finished A";
146 case SSL2_ST_GET_SERVER_FINISHED_B:
147 str = "SSLv2 read server finished B";
149 case SSL2_ST_GET_CLIENT_HELLO_A:
150 str = "SSLv2 read client hello A";
152 case SSL2_ST_GET_CLIENT_HELLO_B:
153 str = "SSLv2 read client hello B";
155 case SSL2_ST_GET_CLIENT_HELLO_C:
156 str = "SSLv2 read client hello C";
158 case SSL2_ST_SEND_SERVER_HELLO_A:
159 str = "SSLv2 write server hello A";
161 case SSL2_ST_SEND_SERVER_HELLO_B:
162 str = "SSLv2 write server hello B";
164 case SSL2_ST_GET_CLIENT_MASTER_KEY_A:
165 str = "SSLv2 read client master key A";
167 case SSL2_ST_GET_CLIENT_MASTER_KEY_B:
168 str = "SSLv2 read client master key B";
170 case SSL2_ST_SEND_SERVER_VERIFY_A:
171 str = "SSLv2 write server verify A";
173 case SSL2_ST_SEND_SERVER_VERIFY_B:
174 str = "SSLv2 write server verify B";
176 case SSL2_ST_SEND_SERVER_VERIFY_C:
177 str = "SSLv2 write server verify C";
179 case SSL2_ST_GET_CLIENT_FINISHED_A:
180 str = "SSLv2 read client finished A";
182 case SSL2_ST_GET_CLIENT_FINISHED_B:
183 str = "SSLv2 read client finished B";
185 case SSL2_ST_SEND_SERVER_FINISHED_A:
186 str = "SSLv2 write server finished A";
188 case SSL2_ST_SEND_SERVER_FINISHED_B:
189 str = "SSLv2 write server finished B";
191 case SSL2_ST_SEND_REQUEST_CERTIFICATE_A:
192 str = "SSLv2 write request certificate A";
194 case SSL2_ST_SEND_REQUEST_CERTIFICATE_B:
195 str = "SSLv2 write request certificate B";
197 case SSL2_ST_SEND_REQUEST_CERTIFICATE_C:
198 str = "SSLv2 write request certificate C";
200 case SSL2_ST_SEND_REQUEST_CERTIFICATE_D:
201 str = "SSLv2 write request certificate D";
203 case SSL2_ST_X509_GET_SERVER_CERTIFICATE:
204 str = "SSLv2 X509 read server certificate";
206 case SSL2_ST_X509_GET_CLIENT_CERTIFICATE:
207 str = "SSLv2 X509 read client certificate";
211 #ifndef OPENSSL_NO_SSL3
212 /* SSLv3 additions */
213 case SSL3_ST_CW_CLNT_HELLO_A:
214 str = "SSLv3 write client hello A";
216 case SSL3_ST_CW_CLNT_HELLO_B:
217 str = "SSLv3 write client hello B";
219 case SSL3_ST_CR_SRVR_HELLO_A:
220 str = "SSLv3 read server hello A";
222 case SSL3_ST_CR_SRVR_HELLO_B:
223 str = "SSLv3 read server hello B";
225 case SSL3_ST_CR_CERT_A:
226 str = "SSLv3 read server certificate A";
228 case SSL3_ST_CR_CERT_B:
229 str = "SSLv3 read server certificate B";
231 case SSL3_ST_CR_KEY_EXCH_A:
232 str = "SSLv3 read server key exchange A";
234 case SSL3_ST_CR_KEY_EXCH_B:
235 str = "SSLv3 read server key exchange B";
237 case SSL3_ST_CR_CERT_REQ_A:
238 str = "SSLv3 read server certificate request A";
240 case SSL3_ST_CR_CERT_REQ_B:
241 str = "SSLv3 read server certificate request B";
243 case SSL3_ST_CR_SESSION_TICKET_A:
244 str = "SSLv3 read server session ticket A";
246 case SSL3_ST_CR_SESSION_TICKET_B:
247 str = "SSLv3 read server session ticket B";
249 case SSL3_ST_CR_SRVR_DONE_A:
250 str = "SSLv3 read server done A";
252 case SSL3_ST_CR_SRVR_DONE_B:
253 str = "SSLv3 read server done B";
255 case SSL3_ST_CW_CERT_A:
256 str = "SSLv3 write client certificate A";
258 case SSL3_ST_CW_CERT_B:
259 str = "SSLv3 write client certificate B";
261 case SSL3_ST_CW_CERT_C:
262 str = "SSLv3 write client certificate C";
264 case SSL3_ST_CW_CERT_D:
265 str = "SSLv3 write client certificate D";
267 case SSL3_ST_CW_KEY_EXCH_A:
268 str = "SSLv3 write client key exchange A";
270 case SSL3_ST_CW_KEY_EXCH_B:
271 str = "SSLv3 write client key exchange B";
273 case SSL3_ST_CW_CERT_VRFY_A:
274 str = "SSLv3 write certificate verify A";
276 case SSL3_ST_CW_CERT_VRFY_B:
277 str = "SSLv3 write certificate verify B";
280 case SSL3_ST_CW_CHANGE_A:
281 case SSL3_ST_SW_CHANGE_A:
282 str = "SSLv3 write change cipher spec A";
284 case SSL3_ST_CW_CHANGE_B:
285 case SSL3_ST_SW_CHANGE_B:
286 str = "SSLv3 write change cipher spec B";
288 case SSL3_ST_CW_FINISHED_A:
289 case SSL3_ST_SW_FINISHED_A:
290 str = "SSLv3 write finished A";
292 case SSL3_ST_CW_FINISHED_B:
293 case SSL3_ST_SW_FINISHED_B:
294 str = "SSLv3 write finished B";
296 case SSL3_ST_CR_CHANGE_A:
297 case SSL3_ST_SR_CHANGE_A:
298 str = "SSLv3 read change cipher spec A";
300 case SSL3_ST_CR_CHANGE_B:
301 case SSL3_ST_SR_CHANGE_B:
302 str = "SSLv3 read change cipher spec B";
304 case SSL3_ST_CR_FINISHED_A:
305 case SSL3_ST_SR_FINISHED_A:
306 str = "SSLv3 read finished A";
308 case SSL3_ST_CR_FINISHED_B:
309 case SSL3_ST_SR_FINISHED_B:
310 str = "SSLv3 read finished B";
313 case SSL3_ST_CW_FLUSH:
314 case SSL3_ST_SW_FLUSH:
315 str = "SSLv3 flush data";
318 case SSL3_ST_SR_CLNT_HELLO_A:
319 str = "SSLv3 read client hello A";
321 case SSL3_ST_SR_CLNT_HELLO_B:
322 str = "SSLv3 read client hello B";
324 case SSL3_ST_SR_CLNT_HELLO_C:
325 str = "SSLv3 read client hello C";
327 case SSL3_ST_SW_HELLO_REQ_A:
328 str = "SSLv3 write hello request A";
330 case SSL3_ST_SW_HELLO_REQ_B:
331 str = "SSLv3 write hello request B";
333 case SSL3_ST_SW_HELLO_REQ_C:
334 str = "SSLv3 write hello request C";
336 case SSL3_ST_SW_SRVR_HELLO_A:
337 str = "SSLv3 write server hello A";
339 case SSL3_ST_SW_SRVR_HELLO_B:
340 str = "SSLv3 write server hello B";
342 case SSL3_ST_SW_CERT_A:
343 str = "SSLv3 write certificate A";
345 case SSL3_ST_SW_CERT_B:
346 str = "SSLv3 write certificate B";
348 case SSL3_ST_SW_KEY_EXCH_A:
349 str = "SSLv3 write key exchange A";
351 case SSL3_ST_SW_KEY_EXCH_B:
352 str = "SSLv3 write key exchange B";
354 case SSL3_ST_SW_CERT_REQ_A:
355 str = "SSLv3 write certificate request A";
357 case SSL3_ST_SW_CERT_REQ_B:
358 str = "SSLv3 write certificate request B";
360 case SSL3_ST_SW_SESSION_TICKET_A:
361 str = "SSLv3 write session ticket A";
363 case SSL3_ST_SW_SESSION_TICKET_B:
364 str = "SSLv3 write session ticket B";
366 case SSL3_ST_SW_SRVR_DONE_A:
367 str = "SSLv3 write server done A";
369 case SSL3_ST_SW_SRVR_DONE_B:
370 str = "SSLv3 write server done B";
372 case SSL3_ST_SR_CERT_A:
373 str = "SSLv3 read client certificate A";
375 case SSL3_ST_SR_CERT_B:
376 str = "SSLv3 read client certificate B";
378 case SSL3_ST_SR_KEY_EXCH_A:
379 str = "SSLv3 read client key exchange A";
381 case SSL3_ST_SR_KEY_EXCH_B:
382 str = "SSLv3 read client key exchange B";
384 case SSL3_ST_SR_CERT_VRFY_A:
385 str = "SSLv3 read certificate verify A";
387 case SSL3_ST_SR_CERT_VRFY_B:
388 str = "SSLv3 read certificate verify B";
392 /* SSLv2/v3 compatibility states */
394 case SSL23_ST_CW_CLNT_HELLO_A:
395 str = "SSLv2/v3 write client hello A";
397 case SSL23_ST_CW_CLNT_HELLO_B:
398 str = "SSLv2/v3 write client hello B";
400 case SSL23_ST_CR_SRVR_HELLO_A:
401 str = "SSLv2/v3 read server hello A";
403 case SSL23_ST_CR_SRVR_HELLO_B:
404 str = "SSLv2/v3 read server hello B";
407 case SSL23_ST_SR_CLNT_HELLO_A:
408 str = "SSLv2/v3 read client hello A";
410 case SSL23_ST_SR_CLNT_HELLO_B:
411 str = "SSLv2/v3 read client hello B";
415 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
416 str = "DTLS1 read hello verify request A";
418 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
419 str = "DTLS1 read hello verify request B";
421 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
422 str = "DTLS1 write hello verify request A";
424 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
425 str = "DTLS1 write hello verify request B";
429 str = "unknown state";
435 const char *SSL_rstate_string_long(const SSL *s)
440 case SSL_ST_READ_HEADER:
443 case SSL_ST_READ_BODY:
446 case SSL_ST_READ_DONE:
456 const char *SSL_state_string(const SSL *s)
473 #ifndef OPENSSL_NO_SSL2
474 case SSL2_ST_CLIENT_START_ENCRYPTION:
477 case SSL2_ST_SERVER_START_ENCRYPTION:
480 case SSL2_ST_SEND_CLIENT_HELLO_A:
483 case SSL2_ST_SEND_CLIENT_HELLO_B:
486 case SSL2_ST_GET_SERVER_HELLO_A:
489 case SSL2_ST_GET_SERVER_HELLO_B:
492 case SSL2_ST_SEND_CLIENT_MASTER_KEY_A:
495 case SSL2_ST_SEND_CLIENT_MASTER_KEY_B:
498 case SSL2_ST_SEND_CLIENT_FINISHED_A:
501 case SSL2_ST_SEND_CLIENT_FINISHED_B:
504 case SSL2_ST_SEND_CLIENT_CERTIFICATE_A:
507 case SSL2_ST_SEND_CLIENT_CERTIFICATE_B:
510 case SSL2_ST_SEND_CLIENT_CERTIFICATE_C:
513 case SSL2_ST_SEND_CLIENT_CERTIFICATE_D:
516 case SSL2_ST_GET_SERVER_VERIFY_A:
519 case SSL2_ST_GET_SERVER_VERIFY_B:
522 case SSL2_ST_GET_SERVER_FINISHED_A:
525 case SSL2_ST_GET_SERVER_FINISHED_B:
528 case SSL2_ST_GET_CLIENT_HELLO_A:
531 case SSL2_ST_GET_CLIENT_HELLO_B:
534 case SSL2_ST_GET_CLIENT_HELLO_C:
537 case SSL2_ST_SEND_SERVER_HELLO_A:
540 case SSL2_ST_SEND_SERVER_HELLO_B:
543 case SSL2_ST_GET_CLIENT_MASTER_KEY_A:
546 case SSL2_ST_GET_CLIENT_MASTER_KEY_B:
549 case SSL2_ST_SEND_SERVER_VERIFY_A:
552 case SSL2_ST_SEND_SERVER_VERIFY_B:
555 case SSL2_ST_SEND_SERVER_VERIFY_C:
558 case SSL2_ST_GET_CLIENT_FINISHED_A:
561 case SSL2_ST_GET_CLIENT_FINISHED_B:
564 case SSL2_ST_SEND_SERVER_FINISHED_A:
567 case SSL2_ST_SEND_SERVER_FINISHED_B:
570 case SSL2_ST_SEND_REQUEST_CERTIFICATE_A:
573 case SSL2_ST_SEND_REQUEST_CERTIFICATE_B:
576 case SSL2_ST_SEND_REQUEST_CERTIFICATE_C:
579 case SSL2_ST_SEND_REQUEST_CERTIFICATE_D:
582 case SSL2_ST_X509_GET_SERVER_CERTIFICATE:
585 case SSL2_ST_X509_GET_CLIENT_CERTIFICATE:
590 #ifndef OPENSSL_NO_SSL3
591 /* SSLv3 additions */
592 case SSL3_ST_SW_FLUSH:
593 case SSL3_ST_CW_FLUSH:
596 case SSL3_ST_CW_CLNT_HELLO_A:
599 case SSL3_ST_CW_CLNT_HELLO_B:
602 case SSL3_ST_CR_SRVR_HELLO_A:
605 case SSL3_ST_CR_SRVR_HELLO_B:
608 case SSL3_ST_CR_CERT_A:
611 case SSL3_ST_CR_CERT_B:
614 case SSL3_ST_CR_KEY_EXCH_A:
617 case SSL3_ST_CR_KEY_EXCH_B:
620 case SSL3_ST_CR_CERT_REQ_A:
623 case SSL3_ST_CR_CERT_REQ_B:
626 case SSL3_ST_CR_SRVR_DONE_A:
629 case SSL3_ST_CR_SRVR_DONE_B:
632 case SSL3_ST_CW_CERT_A:
635 case SSL3_ST_CW_CERT_B:
638 case SSL3_ST_CW_CERT_C:
641 case SSL3_ST_CW_CERT_D:
644 case SSL3_ST_CW_KEY_EXCH_A:
647 case SSL3_ST_CW_KEY_EXCH_B:
650 case SSL3_ST_CW_CERT_VRFY_A:
653 case SSL3_ST_CW_CERT_VRFY_B:
657 case SSL3_ST_SW_CHANGE_A:
658 case SSL3_ST_CW_CHANGE_A:
661 case SSL3_ST_SW_CHANGE_B:
662 case SSL3_ST_CW_CHANGE_B:
665 case SSL3_ST_SW_FINISHED_A:
666 case SSL3_ST_CW_FINISHED_A:
669 case SSL3_ST_SW_FINISHED_B:
670 case SSL3_ST_CW_FINISHED_B:
673 case SSL3_ST_SR_CHANGE_A:
674 case SSL3_ST_CR_CHANGE_A:
677 case SSL3_ST_SR_CHANGE_B:
678 case SSL3_ST_CR_CHANGE_B:
681 case SSL3_ST_SR_FINISHED_A:
682 case SSL3_ST_CR_FINISHED_A:
685 case SSL3_ST_SR_FINISHED_B:
686 case SSL3_ST_CR_FINISHED_B:
690 case SSL3_ST_SW_HELLO_REQ_A:
693 case SSL3_ST_SW_HELLO_REQ_B:
696 case SSL3_ST_SW_HELLO_REQ_C:
699 case SSL3_ST_SR_CLNT_HELLO_A:
702 case SSL3_ST_SR_CLNT_HELLO_B:
705 case SSL3_ST_SR_CLNT_HELLO_C:
708 case SSL3_ST_SW_SRVR_HELLO_A:
711 case SSL3_ST_SW_SRVR_HELLO_B:
714 case SSL3_ST_SW_CERT_A:
717 case SSL3_ST_SW_CERT_B:
720 case SSL3_ST_SW_KEY_EXCH_A:
723 case SSL3_ST_SW_KEY_EXCH_B:
726 case SSL3_ST_SW_CERT_REQ_A:
729 case SSL3_ST_SW_CERT_REQ_B:
732 case SSL3_ST_SW_SRVR_DONE_A:
735 case SSL3_ST_SW_SRVR_DONE_B:
738 case SSL3_ST_SR_CERT_A:
741 case SSL3_ST_SR_CERT_B:
744 case SSL3_ST_SR_KEY_EXCH_A:
747 case SSL3_ST_SR_KEY_EXCH_B:
750 case SSL3_ST_SR_CERT_VRFY_A:
753 case SSL3_ST_SR_CERT_VRFY_B:
758 /* SSLv2/v3 compatibility states */
760 case SSL23_ST_CW_CLNT_HELLO_A:
763 case SSL23_ST_CW_CLNT_HELLO_B:
766 case SSL23_ST_CR_SRVR_HELLO_A:
769 case SSL23_ST_CR_SRVR_HELLO_B:
773 case SSL23_ST_SR_CLNT_HELLO_A:
776 case SSL23_ST_SR_CLNT_HELLO_B:
781 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_A:
784 case DTLS1_ST_CR_HELLO_VERIFY_REQUEST_B:
787 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_A:
790 case DTLS1_ST_SW_HELLO_VERIFY_REQUEST_B:
801 const char *SSL_alert_type_string_long(int value)
804 if (value == SSL3_AL_WARNING)
806 else if (value == SSL3_AL_FATAL)
812 const char *SSL_alert_type_string(int value)
815 if (value == SSL3_AL_WARNING)
817 else if (value == SSL3_AL_FATAL)
823 const char *SSL_alert_desc_string(int value)
827 switch (value & 0xff) {
828 case SSL3_AD_CLOSE_NOTIFY:
831 case SSL3_AD_UNEXPECTED_MESSAGE:
834 case SSL3_AD_BAD_RECORD_MAC:
837 case SSL3_AD_DECOMPRESSION_FAILURE:
840 case SSL3_AD_HANDSHAKE_FAILURE:
843 case SSL3_AD_NO_CERTIFICATE:
846 case SSL3_AD_BAD_CERTIFICATE:
849 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
852 case SSL3_AD_CERTIFICATE_REVOKED:
855 case SSL3_AD_CERTIFICATE_EXPIRED:
858 case SSL3_AD_CERTIFICATE_UNKNOWN:
861 case SSL3_AD_ILLEGAL_PARAMETER:
864 case TLS1_AD_DECRYPTION_FAILED:
867 case TLS1_AD_RECORD_OVERFLOW:
870 case TLS1_AD_UNKNOWN_CA:
873 case TLS1_AD_ACCESS_DENIED:
876 case TLS1_AD_DECODE_ERROR:
879 case TLS1_AD_DECRYPT_ERROR:
882 case TLS1_AD_EXPORT_RESTRICTION:
885 case TLS1_AD_PROTOCOL_VERSION:
888 case TLS1_AD_INSUFFICIENT_SECURITY:
891 case TLS1_AD_INTERNAL_ERROR:
894 case TLS1_AD_USER_CANCELLED:
897 case TLS1_AD_NO_RENEGOTIATION:
900 case TLS1_AD_UNSUPPORTED_EXTENSION:
903 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
906 case TLS1_AD_UNRECOGNIZED_NAME:
909 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
912 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
915 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
925 const char *SSL_alert_desc_string_long(int value)
929 switch (value & 0xff) {
930 case SSL3_AD_CLOSE_NOTIFY:
931 str = "close notify";
933 case SSL3_AD_UNEXPECTED_MESSAGE:
934 str = "unexpected_message";
936 case SSL3_AD_BAD_RECORD_MAC:
937 str = "bad record mac";
939 case SSL3_AD_DECOMPRESSION_FAILURE:
940 str = "decompression failure";
942 case SSL3_AD_HANDSHAKE_FAILURE:
943 str = "handshake failure";
945 case SSL3_AD_NO_CERTIFICATE:
946 str = "no certificate";
948 case SSL3_AD_BAD_CERTIFICATE:
949 str = "bad certificate";
951 case SSL3_AD_UNSUPPORTED_CERTIFICATE:
952 str = "unsupported certificate";
954 case SSL3_AD_CERTIFICATE_REVOKED:
955 str = "certificate revoked";
957 case SSL3_AD_CERTIFICATE_EXPIRED:
958 str = "certificate expired";
960 case SSL3_AD_CERTIFICATE_UNKNOWN:
961 str = "certificate unknown";
963 case SSL3_AD_ILLEGAL_PARAMETER:
964 str = "illegal parameter";
966 case TLS1_AD_DECRYPTION_FAILED:
967 str = "decryption failed";
969 case TLS1_AD_RECORD_OVERFLOW:
970 str = "record overflow";
972 case TLS1_AD_UNKNOWN_CA:
975 case TLS1_AD_ACCESS_DENIED:
976 str = "access denied";
978 case TLS1_AD_DECODE_ERROR:
979 str = "decode error";
981 case TLS1_AD_DECRYPT_ERROR:
982 str = "decrypt error";
984 case TLS1_AD_EXPORT_RESTRICTION:
985 str = "export restriction";
987 case TLS1_AD_PROTOCOL_VERSION:
988 str = "protocol version";
990 case TLS1_AD_INSUFFICIENT_SECURITY:
991 str = "insufficient security";
993 case TLS1_AD_INTERNAL_ERROR:
994 str = "internal error";
996 case TLS1_AD_USER_CANCELLED:
997 str = "user canceled";
999 case TLS1_AD_NO_RENEGOTIATION:
1000 str = "no renegotiation";
1002 case TLS1_AD_UNSUPPORTED_EXTENSION:
1003 str = "unsupported extension";
1005 case TLS1_AD_CERTIFICATE_UNOBTAINABLE:
1006 str = "certificate unobtainable";
1008 case TLS1_AD_UNRECOGNIZED_NAME:
1009 str = "unrecognized name";
1011 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE:
1012 str = "bad certificate status response";
1014 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE:
1015 str = "bad certificate hash value";
1017 case TLS1_AD_UNKNOWN_PSK_IDENTITY:
1018 str = "unknown PSK identity";
1027 const char *SSL_rstate_string(const SSL *s)
1031 switch (s->rstate) {
1032 case SSL_ST_READ_HEADER:
1035 case SSL_ST_READ_BODY:
1038 case SSL_ST_READ_DONE: