summaryrefslogtreecommitdiffstats
path: root/apps/s_client.c
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2017-02-24 16:11:03 +0000
committerMatt Caswell <matt@openssl.org>2017-03-02 17:44:16 +0000
commit0a5ece5bd20aac050d3c77c4f1fb760aa7892ab0 (patch)
treeddf0b23c2c5cc08d316c1e9617bd23b3ba0299de /apps/s_client.c
parentfd6c102520e3829a10fb273eaa62bbccf793e22b (diff)
Tighten sanity checks when calling early data functions
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2737)
Diffstat (limited to 'apps/s_client.c')
-rw-r--r--apps/s_client.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/s_client.c b/apps/s_client.c
index 3ecc601883..c11a634ac9 100644
--- a/apps/s_client.c
+++ b/apps/s_client.c
@@ -2359,7 +2359,9 @@ int s_client_main(int argc, char **argv)
break;
}
- if (early_data_file != NULL) {
+ if (early_data_file != NULL
+ && SSL_get0_session(con) != NULL
+ && SSL_SESSION_get_max_early_data(SSL_get0_session(con)) > 0) {
BIO *edfile = BIO_new_file(early_data_file, "r");
size_t readbytes, writtenbytes;
int finish = 0;