diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libssl/ssl_txt.c | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/src/lib/libssl/ssl_txt.c b/src/lib/libssl/ssl_txt.c index 06b86750fd..3122440e26 100644 --- a/src/lib/libssl/ssl_txt.c +++ b/src/lib/libssl/ssl_txt.c | |||
| @@ -55,6 +55,32 @@ | |||
| 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 <openssl/buffer.h> | 86 | #include <openssl/buffer.h> |
| @@ -91,6 +117,10 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) | |||
| 91 | s="SSLv3"; | 117 | s="SSLv3"; |
| 92 | else if (x->ssl_version == TLS1_VERSION) | 118 | else if (x->ssl_version == TLS1_VERSION) |
| 93 | s="TLSv1"; | 119 | s="TLSv1"; |
| 120 | else if (x->ssl_version == DTLS1_VERSION) | ||
| 121 | s="DTLSv1"; | ||
| 122 | else if (x->ssl_version == DTLS1_BAD_VER) | ||
| 123 | s="DTLSv1-bad"; | ||
| 94 | else | 124 | else |
| 95 | s="unknown"; | 125 | s="unknown"; |
| 96 | if (BIO_printf(bp," Protocol : %s\n",s) <= 0) goto err; | 126 | if (BIO_printf(bp," Protocol : %s\n",s) <= 0) goto err; |
| @@ -151,6 +181,12 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) | |||
| 151 | if (BIO_printf(bp,"%02X",x->krb5_client_princ[i]) <= 0) goto err; | 181 | if (BIO_printf(bp,"%02X",x->krb5_client_princ[i]) <= 0) goto err; |
| 152 | } | 182 | } |
| 153 | #endif /* OPENSSL_NO_KRB5 */ | 183 | #endif /* OPENSSL_NO_KRB5 */ |
| 184 | #ifndef OPENSSL_NO_PSK | ||
| 185 | if (BIO_puts(bp,"\n PSK identity: ") <= 0) goto err; | ||
| 186 | if (BIO_printf(bp, "%s", x->psk_identity ? x->psk_identity : "None") <= 0) goto err; | ||
| 187 | if (BIO_puts(bp,"\n PSK identity hint: ") <= 0) goto err; | ||
| 188 | if (BIO_printf(bp, "%s", x->psk_identity_hint ? x->psk_identity_hint : "None") <= 0) goto err; | ||
| 189 | #endif | ||
| 154 | #ifndef OPENSSL_NO_TLSEXT | 190 | #ifndef OPENSSL_NO_TLSEXT |
| 155 | if (x->tlsext_tick_lifetime_hint) | 191 | if (x->tlsext_tick_lifetime_hint) |
| 156 | { | 192 | { |
| @@ -166,19 +202,20 @@ int SSL_SESSION_print(BIO *bp, const SSL_SESSION *x) | |||
| 166 | goto err; | 202 | goto err; |
| 167 | } | 203 | } |
| 168 | #endif | 204 | #endif |
| 205 | |||
| 169 | #ifndef OPENSSL_NO_COMP | 206 | #ifndef OPENSSL_NO_COMP |
| 170 | if (x->compress_meth != 0) | 207 | if (x->compress_meth != 0) |
| 171 | { | 208 | { |
| 172 | SSL_COMP *comp = NULL; | 209 | SSL_COMP *comp = NULL; |
| 173 | 210 | ||
| 174 | ssl_cipher_get_evp(x,NULL,NULL,&comp); | 211 | ssl_cipher_get_evp(x,NULL,NULL,NULL,NULL,&comp); |
| 175 | if (comp == NULL) | 212 | if (comp == NULL) |
| 176 | { | 213 | { |
| 177 | if (BIO_printf(bp,"\n Compression: %d",x->compress_meth) <= 0) goto err; | 214 | if (BIO_printf(bp,"\n Compression: %d",x->compress_meth) <= 0) goto err; |
| 178 | } | 215 | } |
| 179 | else | 216 | else |
| 180 | { | 217 | { |
| 181 | if (BIO_printf(bp,"\n Compression: %d (%s)", comp->id,comp->method->name) <= 0) goto err; | 218 | if (BIO_printf(bp,"\n Compression: %d (%s)", comp->id,comp->method->name) <= 0) goto err; |
| 182 | } | 219 | } |
| 183 | } | 220 | } |
| 184 | #endif | 221 | #endif |
