From 576eb3958cbb18484680c0bbe7cbf2dce9af0f1b Mon Sep 17 00:00:00 2001 From: Matt Caswell Date: Thu, 23 Feb 2017 11:52:43 +0000 Subject: [PATCH] Get s_client to report on whether early data was accepted or not Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2737) --- apps/s_client.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/apps/s_client.c b/apps/s_client.c index faa39ec530..3ecc601883 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -2978,6 +2978,23 @@ static void print_stuff(BIO *bio, SSL *s, int full) } #endif + if (SSL_version(s) == TLS1_3_VERSION) { + switch (SSL_get_early_data_status(s)) { + case SSL_EARLY_DATA_NOT_SENT: + BIO_printf(bio, "Early data was not sent\n"); + break; + + case SSL_EARLY_DATA_REJECTED: + BIO_printf(bio, "Early data was rejected\n"); + break; + + case SSL_EARLY_DATA_ACCEPTED: + BIO_printf(bio, "Early data was accepted\n"); + break; + + } + } + SSL_SESSION_print(bio, SSL_get_session(s)); if (SSL_get_session(s) != NULL && keymatexportlabel != NULL) { BIO_printf(bio, "Keying material exporter:\n"); -- 2.25.1