OLD | NEW |
1 /* ssl/ssl_stat.c */ | 1 /* ssl/ssl_stat.c */ |
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 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 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 | 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 |
56 * [including the GNU Public Licence.] | 56 * [including the GNU Public Licence.] |
57 */ | 57 */ |
| 58 /* ==================================================================== |
| 59 * Copyright 2005 Nokia. All rights reserved. |
| 60 * |
| 61 * The portions of the attached software ("Contribution") is developed by |
| 62 * Nokia Corporation and is licensed pursuant to the OpenSSL open source |
| 63 * license. |
| 64 * |
| 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. |
| 68 * |
| 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. |
| 72 * |
| 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. |
| 77 * |
| 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 |
| 82 * OTHERWISE. |
| 83 */ |
58 | 84 |
59 #include <stdio.h> | 85 #include <stdio.h> |
60 #include "ssl_locl.h" | 86 #include "ssl_locl.h" |
61 | 87 |
62 const char *SSL_state_string_long(const SSL *s) | 88 const char *SSL_state_string_long(const SSL *s) |
63 { | 89 { |
64 const char *str; | 90 const char *str; |
65 | 91 |
66 switch (s->state) | 92 switch (s->state) |
67 { | 93 { |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 case TLS1_AD_UNKNOWN_CA: str="CA"; break; | 433 case TLS1_AD_UNKNOWN_CA: str="CA"; break; |
408 case TLS1_AD_ACCESS_DENIED: str="AD"; break; | 434 case TLS1_AD_ACCESS_DENIED: str="AD"; break; |
409 case TLS1_AD_DECODE_ERROR: str="DE"; break; | 435 case TLS1_AD_DECODE_ERROR: str="DE"; break; |
410 case TLS1_AD_DECRYPT_ERROR: str="CY"; break; | 436 case TLS1_AD_DECRYPT_ERROR: str="CY"; break; |
411 case TLS1_AD_EXPORT_RESTRICTION: str="ER"; break; | 437 case TLS1_AD_EXPORT_RESTRICTION: str="ER"; break; |
412 case TLS1_AD_PROTOCOL_VERSION: str="PV"; break; | 438 case TLS1_AD_PROTOCOL_VERSION: str="PV"; break; |
413 case TLS1_AD_INSUFFICIENT_SECURITY: str="IS"; break; | 439 case TLS1_AD_INSUFFICIENT_SECURITY: str="IS"; break; |
414 case TLS1_AD_INTERNAL_ERROR: str="IE"; break; | 440 case TLS1_AD_INTERNAL_ERROR: str="IE"; break; |
415 case TLS1_AD_USER_CANCELLED: str="US"; break; | 441 case TLS1_AD_USER_CANCELLED: str="US"; break; |
416 case TLS1_AD_NO_RENEGOTIATION: str="NR"; break; | 442 case TLS1_AD_NO_RENEGOTIATION: str="NR"; break; |
| 443 case TLS1_AD_UNSUPPORTED_EXTENSION: str="UE"; break; |
| 444 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: str="CO"; break; |
| 445 case TLS1_AD_UNRECOGNIZED_NAME: str="UN"; break; |
| 446 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: str="BR"; break; |
| 447 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: str="BH"; break; |
| 448 case TLS1_AD_UNKNOWN_PSK_IDENTITY: str="UP"; break; |
417 default: str="UK"; break; | 449 default: str="UK"; break; |
418 } | 450 } |
419 return(str); | 451 return(str); |
420 } | 452 } |
421 | 453 |
422 const char *SSL_alert_desc_string_long(int value) | 454 const char *SSL_alert_desc_string_long(int value) |
423 { | 455 { |
424 const char *str; | 456 const char *str; |
425 | 457 |
426 switch (value & 0xff) | 458 switch (value & 0xff) |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
490 break; | 522 break; |
491 case TLS1_AD_INTERNAL_ERROR: | 523 case TLS1_AD_INTERNAL_ERROR: |
492 str="internal error"; | 524 str="internal error"; |
493 break; | 525 break; |
494 case TLS1_AD_USER_CANCELLED: | 526 case TLS1_AD_USER_CANCELLED: |
495 str="user canceled"; | 527 str="user canceled"; |
496 break; | 528 break; |
497 case TLS1_AD_NO_RENEGOTIATION: | 529 case TLS1_AD_NO_RENEGOTIATION: |
498 str="no renegotiation"; | 530 str="no renegotiation"; |
499 break; | 531 break; |
| 532 case TLS1_AD_UNSUPPORTED_EXTENSION: |
| 533 str="unsupported extension"; |
| 534 break; |
| 535 case TLS1_AD_CERTIFICATE_UNOBTAINABLE: |
| 536 str="certificate unobtainable"; |
| 537 break; |
| 538 case TLS1_AD_UNRECOGNIZED_NAME: |
| 539 str="unrecognized name"; |
| 540 break; |
| 541 case TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE: |
| 542 str="bad certificate status response"; |
| 543 break; |
| 544 case TLS1_AD_BAD_CERTIFICATE_HASH_VALUE: |
| 545 str="bad certificate hash value"; |
| 546 break; |
| 547 case TLS1_AD_UNKNOWN_PSK_IDENTITY: |
| 548 str="unknown PSK identity"; |
| 549 break; |
500 default: str="unknown"; break; | 550 default: str="unknown"; break; |
501 } | 551 } |
502 return(str); | 552 return(str); |
503 } | 553 } |
504 | 554 |
505 const char *SSL_rstate_string(const SSL *s) | 555 const char *SSL_rstate_string(const SSL *s) |
506 { | 556 { |
507 const char *str; | 557 const char *str; |
508 | 558 |
509 switch (s->rstate) | 559 switch (s->rstate) |
510 { | 560 { |
511 case SSL_ST_READ_HEADER:str="RH"; break; | 561 case SSL_ST_READ_HEADER:str="RH"; break; |
512 case SSL_ST_READ_BODY: str="RB"; break; | 562 case SSL_ST_READ_BODY: str="RB"; break; |
513 case SSL_ST_READ_DONE: str="RD"; break; | 563 case SSL_ST_READ_DONE: str="RD"; break; |
514 default: str="unknown"; break; | 564 default: str="unknown"; break; |
515 } | 565 } |
516 return(str); | 566 return(str); |
517 } | 567 } |
OLD | NEW |