diff options
author | yang-g <yangg@google.com> | 2015-09-18 12:11:05 -0700 |
---|---|---|
committer | yang-g <yangg@google.com> | 2015-10-01 11:39:24 -0700 |
commit | 035cf093de8e18095f9aeca3a7fe4faaa05c4639 (patch) | |
tree | 017fa487893f1b2f05569f68afe59fe47432e412 /test/cpp/interop | |
parent | 2b2a1ad6ca97da100fd469085f0ffef847e87e65 (diff) |
enable_ssl to use_tls
Diffstat (limited to 'test/cpp/interop')
-rw-r--r-- | test/cpp/interop/client.cc | 4 | ||||
-rw-r--r-- | test/cpp/interop/client_helper.cc | 14 | ||||
-rw-r--r-- | test/cpp/interop/server.cc | 2 | ||||
-rw-r--r-- | test/cpp/interop/server_helper.cc | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 58c71cca35..e785ac9009 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -45,7 +45,7 @@ #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/test_config.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_bool(use_prod_roots, false, "True to use SSL roots for google"); DEFINE_int32(server_port, 0, "Server port."); DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); @@ -143,7 +143,7 @@ int main(int argc, char** argv) { client.DoEmptyStream(); client.DoStatusWithMessage(); // service_account_creds and jwt_token_creds can only run with ssl. - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { grpc::string json_key = GetServiceAccountJsonKey(); client.DoJwtTokenCreds(json_key); client.DoOauth2AuthToken( diff --git a/test/cpp/interop/client_helper.cc b/test/cpp/interop/client_helper.cc index f85aa6ad8e..cbad21e318 100644 --- a/test/cpp/interop/client_helper.cc +++ b/test/cpp/interop/client_helper.cc @@ -51,7 +51,7 @@ #include "test/core/security/oauth2_utils.h" #include "test/cpp/util/create_test_channel.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); DECLARE_bool(use_prod_roots); DECLARE_int32(server_port); DECLARE_string(server_host); @@ -99,27 +99,27 @@ std::shared_ptr<Channel> CreateChannelForTestCase( if (test_case == "compute_engine_creds") { std::shared_ptr<Credentials> creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); creds = GoogleComputeEngineCredentials(); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "jwt_token_creds") { std::shared_ptr<Credentials> creds; - GPR_ASSERT(FLAGS_enable_ssl); + GPR_ASSERT(FLAGS_use_tls); grpc::string json_key = GetServiceAccountJsonKey(); std::chrono::seconds token_lifetime = std::chrono::hours(1); creds = ServiceAccountJWTAccessCredentials(json_key, token_lifetime.count()); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else if (test_case == "oauth2_auth_token") { grpc::string raw_token = GetOauth2AccessToken(); std::shared_ptr<Credentials> creds = AccessTokenCredentials(raw_token); return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots, creds); + FLAGS_use_tls, FLAGS_use_prod_roots, creds); } else { return CreateTestChannel(host_port, FLAGS_server_host_override, - FLAGS_enable_ssl, FLAGS_use_prod_roots); + FLAGS_use_tls, FLAGS_use_prod_roots); } } diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 03b6532447..c0e1ec943d 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -54,7 +54,7 @@ #include "test/proto/empty.grpc.pb.h" #include "test/proto/messages.grpc.pb.h" -DEFINE_bool(enable_ssl, false, "Whether to use ssl/tls."); +DEFINE_bool(use_tls, false, "Whether to use tls."); DEFINE_int32(port, 0, "Server port."); using grpc::Server; diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index 015198354e..4570750846 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -41,13 +41,13 @@ #include "src/core/surface/call.h" #include "test/core/end2end/data/ssl_test_data.h" -DECLARE_bool(enable_ssl); +DECLARE_bool(use_tls); namespace grpc { namespace testing { std::shared_ptr<ServerCredentials> CreateInteropServerCredentials() { - if (FLAGS_enable_ssl) { + if (FLAGS_use_tls) { SslServerCredentialsOptions::PemKeyCertPair pkcp = {test_server1_key, test_server1_cert}; SslServerCredentialsOptions ssl_opts; |