aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/cpp/util
diff options
context:
space:
mode:
authorGravatar Nathan Herring <nherring@google.com>2018-07-20 15:23:04 +0200
committerGravatar Nathan Herring <nherring@google.com>2018-07-20 15:23:04 +0200
commit6f1604b1eb873f71d72c93a483a9aca56a9f0418 (patch)
tree00792696b18ed8371429d205e43aea76e17faf71 /test/cpp/util
parentadb8581456447c1468d161af90d9194c473d3fce (diff)
Fixup: Use a more exact logic for google default credentials.
Diffstat (limited to 'test/cpp/util')
-rw-r--r--test/cpp/util/cli_credentials.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/cpp/util/cli_credentials.cc b/test/cpp/util/cli_credentials.cc
index 2494e22abb..68eb0b17ce 100644
--- a/test/cpp/util/cli_credentials.cc
+++ b/test/cpp/util/cli_credentials.cc
@@ -67,7 +67,9 @@ const grpc::string CliCredentials::GetCredentialUsage() const {
}
const grpc::string CliCredentials::GetSslTargetNameOverride() const {
- return (FLAGS_enable_ssl || FLAGS_use_auth) ? FLAGS_ssl_target : "";
+ bool use_tls = FLAGS_enable_ssl ||
+ (FLAGS_access_token.empty() && FLAGS_use_auth);
+ return use_tls ? FLAGS_ssl_target : "";
}
} // namespace testing