From 6f1604b1eb873f71d72c93a483a9aca56a9f0418 Mon Sep 17 00:00:00 2001 From: Nathan Herring Date: Fri, 20 Jul 2018 15:23:04 +0200 Subject: Fixup: Use a more exact logic for google default credentials. --- test/cpp/util/cli_credentials.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/cpp/util') 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 -- cgit v1.2.3