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 <agl@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
Matthew Braithwaite 2018-07-17 16:48:01 -07:00 committed by CQ bot account: commit-bot@chromium.org
parent 6d597a34b6
commit d154c7ccbc

View File

@ -1235,12 +1235,6 @@ bssl::UniquePtr<SSL_CTX> 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<SSL_CTX> 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,