From 29fac541b0af22fa1874c5594fabeff754c7dafe Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Fri, 17 Feb 2017 17:41:46 +0000 Subject: [PATCH] Teach SSL_trace() about the early_data_info extension Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2737) --- ssl/t1_trce.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/ssl/t1_trce.c b/ssl/t1_trce.c index e99a2ceca8..459827b76d 100644 --- a/ssl/t1_trce.c +++ b/ssl/t1_trce.c @@ -475,7 +475,8 @@ static ssl_trace_tbl ssl_exts_tbl[] = { {TLSEXT_TYPE_signed_certificate_timestamp, "signed_certificate_timestamps"}, {TLSEXT_TYPE_padding, "padding"}, {TLSEXT_TYPE_encrypt_then_mac, "encrypt_then_mac"}, - {TLSEXT_TYPE_extended_master_secret, "extended_master_secret"} + {TLSEXT_TYPE_extended_master_secret, "extended_master_secret"}, + {TLSEXT_TYPE_early_data_info, "ticket_early_data_info"} }; static ssl_trace_tbl ssl_groups_tbl[] = { @@ -680,6 +681,7 @@ static int ssl_print_extension(BIO *bio, int indent, int server, { size_t xlen, share_len; unsigned int sigalg; + uint32_t max_early_data; BIO_indent(bio, indent, 80); BIO_printf(bio, "extension_type=%s(%d), length=%d\n", @@ -830,6 +832,15 @@ static int ssl_print_extension(BIO *bio, int indent, int server, return ssl_trace_list(bio, indent + 2, ext + 1, xlen, 1, ssl_psk_kex_modes_tbl); + case TLSEXT_TYPE_early_data_info: + if (extlen != 4) + return 0; + max_early_data = (ext[0] << 24) | (ext[1] << 16) | (ext[2] << 8) + | ext[3]; + BIO_indent(bio, indent + 2, 80); + BIO_printf(bio, "max_early_data=%u\n", max_early_data); + break; + default: BIO_dump_indent(bio, (const char *)ext, extlen, indent + 2); } -- 2.25.1