aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar yang-g <yangg@google.com>2015-09-18 12:11:05 -0700
committerGravatar yang-g <yangg@google.com>2015-10-01 11:39:24 -0700
commit035cf093de8e18095f9aeca3a7fe4faaa05c4639 (patch)
tree017fa487893f1b2f05569f68afe59fe47432e412
parent2b2a1ad6ca97da100fd469085f0ffef847e87e65 (diff)
enable_ssl to use_tls
-rw-r--r--test/cpp/interop/client.cc4
-rw-r--r--test/cpp/interop/client_helper.cc14
-rw-r--r--test/cpp/interop/server.cc2
-rw-r--r--test/cpp/interop/server_helper.cc4
-rw-r--r--tools/dockerfile/grpc_cxx/Dockerfile2
-rwxr-xr-xtools/gce_setup/grpc_docker.sh10
6 files changed, 18 insertions, 18 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;
diff --git a/tools/dockerfile/grpc_cxx/Dockerfile b/tools/dockerfile/grpc_cxx/Dockerfile
index ac09e25e40..82887df95c 100644
--- a/tools/dockerfile/grpc_cxx/Dockerfile
+++ b/tools/dockerfile/grpc_cxx/Dockerfile
@@ -54,4 +54,4 @@ ADD service_account service_account
ADD cacerts cacerts
ENV GRPC_DEFAULT_SSL_ROOTS_FILE_PATH /cacerts/roots.pem
-CMD ["/var/local/git/grpc/bins/opt/interop_server", "--enable_ssl", "--port=8010"]
+CMD ["/var/local/git/grpc/bins/opt/interop_server", "--use_tls", "--port=8010"]
diff --git a/tools/gce_setup/grpc_docker.sh b/tools/gce_setup/grpc_docker.sh
index 84263ad6b9..fdb7736327 100755
--- a/tools/gce_setup/grpc_docker.sh
+++ b/tools/gce_setup/grpc_docker.sh
@@ -1477,7 +1477,7 @@ grpc_cloud_prod_auth_compute_engine_creds_gen_node_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_interop_gen_cxx_cmd() {
local cmd_prefix="sudo docker run grpc/cxx";
- local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl";
+ local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls";
local the_cmd="$cmd_prefix $test_script $@";
echo $the_cmd
}
@@ -1489,7 +1489,7 @@ grpc_interop_gen_cxx_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_gen_cxx_cmd() {
local cmd_prefix="sudo docker run grpc/cxx";
- local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots";
+ local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots";
local gfe_flags=$(_grpc_prod_gfe_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $@";
echo $the_cmd
@@ -1502,7 +1502,7 @@ grpc_cloud_prod_gen_cxx_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_auth_service_account_creds_gen_cxx_cmd() {
local cmd_prefix="sudo docker run grpc/cxx";
- local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots";
+ local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots";
local gfe_flags=$(_grpc_prod_gfe_flags)
local added_gfe_flags=$(_grpc_svc_acc_test_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@";
@@ -1516,7 +1516,7 @@ grpc_cloud_prod_auth_service_account_creds_gen_cxx_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_auth_compute_engine_creds_gen_cxx_cmd() {
local cmd_prefix="sudo docker run grpc/cxx";
- local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots";
+ local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots";
local gfe_flags=$(_grpc_prod_gfe_flags)
local added_gfe_flags=$(_grpc_gce_test_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@";
@@ -1530,7 +1530,7 @@ grpc_cloud_prod_auth_compute_engine_creds_gen_cxx_cmd() {
# cmd=$($grpc_gen_test_cmd $flags)
grpc_cloud_prod_auth_jwt_token_creds_gen_cxx_cmd() {
local cmd_prefix="sudo docker run grpc/cxx";
- local test_script="/var/local/git/grpc/bins/opt/interop_client --enable_ssl --use_prod_roots";
+ local test_script="/var/local/git/grpc/bins/opt/interop_client --use_tls --use_prod_roots";
local gfe_flags=$(_grpc_prod_gfe_flags)
local added_gfe_flags=$(_grpc_jwt_token_test_flags)
local the_cmd="$cmd_prefix $test_script $gfe_flags $added_gfe_flags $@";