Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
randall committed Jul 1, 2021
1 parent 83d7c33 commit 0f4d375
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions iocore/net/SSLUtils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1298,8 +1298,6 @@ SSLMultiCertConfigLoader::init_server_ssl_ctx(CertLoadData const &data, const SS
std::vector<std::vector<std::string>> key_names;
std::vector<std::string> key_names_list;

ink_assert(data.cert_names_list.size() == data.cert_type_list.size());

bool generate_default_ctx = data.cert_names_list.empty();
if (!generate_default_ctx) {
#ifdef OPENSSL_IS_BORINGSSL
Expand All @@ -1324,11 +1322,18 @@ SSLMultiCertConfigLoader::init_server_ssl_ctx(CertLoadData const &data, const SS

SSLCertContextType ctx_type = SSLCertContextType::GENERIC;
std::vector<SSLLoadingContext> ret;
int i = 0;
SSL_CTX *ctx = nullptr;
unsigned int i = 0;
SSL_CTX *ctx = nullptr;
for (auto const &cert_names_list : cert_names) {
ctx = this->default_server_ssl_ctx();
ctx_type = !generate_default_ctx ? data.cert_type_list[i] : SSLCertContextType::GENERIC;
if (i < key_names.size()) {
key_names_list = key_names[i];
} else {
key_names_list.clear();
}

ctx = this->default_server_ssl_ctx();

ctx_type = (!generate_default_ctx && i < data.cert_type_list.size()) ? data.cert_type_list[i] : SSLCertContextType::GENERIC;

Debug("ssl", "Creating new context %p cert_count=%ld initial: %s", ctx, cert_names_list.size(), cert_names_list[0].c_str());

Expand Down

0 comments on commit 0f4d375

Please sign in to comment.