|
|
@ -23,9 +23,11 @@ |
|
|
|
#include <string.h> |
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
|
|
#include <algorithm> |
|
|
|
#include <algorithm> |
|
|
|
|
|
|
|
#include <initializer_list> |
|
|
|
#include <utility> |
|
|
|
#include <utility> |
|
|
|
|
|
|
|
|
|
|
|
#include "absl/status/status.h" |
|
|
|
#include "absl/status/status.h" |
|
|
|
|
|
|
|
#include "absl/strings/str_format.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
#include "absl/strings/string_view.h" |
|
|
|
#include "absl/types/optional.h" |
|
|
|
#include "absl/types/optional.h" |
|
|
|
|
|
|
|
|
|
|
@ -132,8 +134,9 @@ class grpc_alts_channel_security_connector final |
|
|
|
grpc_core::ArenaPromise<absl::Status> CheckCallHost( |
|
|
|
grpc_core::ArenaPromise<absl::Status> CheckCallHost( |
|
|
|
absl::string_view host, grpc_auth_context*) override { |
|
|
|
absl::string_view host, grpc_auth_context*) override { |
|
|
|
if (host.empty() || host != target_name_) { |
|
|
|
if (host.empty() || host != target_name_) { |
|
|
|
return grpc_core::Immediate(absl::UnauthenticatedError( |
|
|
|
return grpc_core::Immediate(absl::UnauthenticatedError(absl::StrFormat( |
|
|
|
"ALTS call host does not match target name")); |
|
|
|
"ALTS call host [%s] does not match target name [%s].", host, |
|
|
|
|
|
|
|
target_name_))); |
|
|
|
} |
|
|
|
} |
|
|
|
return grpc_core::ImmediateOkStatus(); |
|
|
|
return grpc_core::ImmediateOkStatus(); |
|
|
|
} |
|
|
|
} |
|
|
|