Teach SSL_trace() about the early_data_info extension
@@ -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);
}
