From 9dd862ff6cac26701d8dca23b57a0c382c7d4819 Mon Sep 17 00:00:00 2001 From: Dmitri Tikhonov Date: Wed, 17 Jun 2020 14:47:49 -0400 Subject: [PATCH] Fix early data: call new BoringSSL function to set context Need to call SSL_set_quic_early_data_context() to enable early data in session tickets issued to the client. This change was introduced in when we switched to newer BoringSSL. --- src/liblsquic/lsquic_enc_sess_ietf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/liblsquic/lsquic_enc_sess_ietf.c b/src/liblsquic/lsquic_enc_sess_ietf.c index 2e39941..d66b5e5 100644 --- a/src/liblsquic/lsquic_enc_sess_ietf.c +++ b/src/liblsquic/lsquic_enc_sess_ietf.c @@ -1149,6 +1149,13 @@ iquic_esfi_init_server (enc_session_t *enc_session_p) LSQ_INFO("could not set stream method"); return -1; } + /* TODO: set to transport parameter string instead of the constant string */ + if (!SSL_set_quic_early_data_context(enc_sess->esi_ssl, + (unsigned char *) "lsquic", 6)) + { + LSQ_INFO("could not set early data context"); + return -1; + } maybe_setup_key_logging(enc_sess); transpa_len = gen_trans_params(enc_sess, u.trans_params,