Skip to content

Commit

Permalink
Fix compilation issue and comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Marc Barry <4965634+marc-barry@users.noreply.github.com>
  • Loading branch information
marc-barry committed May 12, 2024
1 parent 4496677 commit ea84fab
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ void CheckRequestUtils::createHttpCheck(
if (cb->connection()->ssl() != nullptr) {
setTLSSession(*attrs->mutable_tls_session(), cb->connection()->ssl());
} else if (!cb->connection()->requestedServerName().empty()) {
std::string sni{b->connection()->requestedServerName()};
std::string sni{cb->connection()->requestedServerName()};
attrs->mutable_tls_session()->set_sni(sni);
}
}
Expand All @@ -280,13 +280,13 @@ void CheckRequestUtils::createTcpCheck(
setAttrContextPeer(*attrs->mutable_destination(), cb->connection(), server_name, true,
include_peer_certificate);

// Try to get the SNI from the TLS session. If not available there then try the
// data from the TLS inspector (i.e. the server name)
if (include_tls_session) {
// Try to get the SNI from the TLS session. If not available there then try the
// data from the TLS inspector (i.e. the server name)
if (cb->connection()->ssl() != nullptr) {
setTLSSession(*attrs->mutable_tls_session(), cb->connection()->ssl());
} else if (!cb->connection()->requestedServerName().empty()) {
std::string sni{b->connection()->requestedServerName()};
std::string sni{cb->connection()->requestedServerName()};
attrs->mutable_tls_session()->set_sni(sni);
}
}
Expand Down

0 comments on commit ea84fab

Please sign in to comment.