From d154c7ccbc133c5e69a3a5281409ee50754eebe0 Mon Sep 17 00:00:00 2001 From: Matthew Braithwaite Date: Tue, 17 Jul 2018 16:48:01 -0700 Subject: [PATCH] shim: call SSL_CTX_set_tlsext_ticket_keys() only once. rather than twice, with the second call overriding the first. Change-Id: Ieb139928edcbe75f1d2e7c2c52c46950d6343a6c Reviewed-on: https://boringssl-review.googlesource.com/29904 Commit-Queue: Adam Langley CQ-Verified: CQ bot account: commit-bot@chromium.org Reviewed-by: Adam Langley --- ssl/test/test_config.cc | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ssl/test/test_config.cc b/ssl/test/test_config.cc index c973fb52..d4e44754 100644 --- a/ssl/test/test_config.cc +++ b/ssl/test/test_config.cc @@ -1235,12 +1235,6 @@ bssl::UniquePtr TestConfig::SetupCtx(SSL_CTX *old_ctx) const { SSL_CTX_set_tlsext_servername_callback(ssl_ctx.get(), ServerNameCallback); } - if (!ticket_key.empty() && - !SSL_CTX_set_tlsext_ticket_keys(ssl_ctx.get(), ticket_key.data(), - ticket_key.size())) { - return nullptr; - } - if (enable_early_data) { SSL_CTX_set_early_data_enabled(ssl_ctx.get(), 1); } @@ -1284,8 +1278,13 @@ bssl::UniquePtr TestConfig::SetupCtx(SSL_CTX *old_ctx) const { return nullptr; } CopySessions(ssl_ctx.get(), old_ctx); + } else if (!ticket_key.empty() && + !SSL_CTX_set_tlsext_ticket_keys(ssl_ctx.get(), ticket_key.data(), + ticket_key.size())) { + return nullptr; } + if (install_cert_compression_algs && (!SSL_CTX_add_cert_compression_alg( ssl_ctx.get(), 0xff02,