diff options
Diffstat (limited to 'test/cpp')
-rw-r--r-- | test/cpp/client/credentials_test.cc | 9 | ||||
-rw-r--r-- | test/cpp/interop/server.cc | 6 | ||||
-rw-r--r-- | test/cpp/util/create_test_channel.cc | 7 |
3 files changed, 3 insertions, 19 deletions
diff --git a/test/cpp/client/credentials_test.cc b/test/cpp/client/credentials_test.cc index ea088b87bd..174d2187b0 100644 --- a/test/cpp/client/credentials_test.cc +++ b/test/cpp/client/credentials_test.cc @@ -45,15 +45,6 @@ class CredentialsTest : public ::testing::Test { protected: }; -TEST_F(CredentialsTest, InvalidSslCreds) { - std::unique_ptr<Credentials> bad1 = - CredentialsFactory::SslCredentials({"", "", ""}); - EXPECT_EQ(nullptr, bad1.get()); - std::unique_ptr<Credentials> bad2 = - CredentialsFactory::SslCredentials({"", "bla", "bla"}); - EXPECT_EQ(nullptr, bad2.get()); -} - TEST_F(CredentialsTest, InvalidServiceAccountCreds) { std::unique_ptr<Credentials> bad1 = CredentialsFactory::ServiceAccountCredentials("", "", diff --git a/test/cpp/interop/server.cc b/test/cpp/interop/server.cc index 561b134c27..5b5c35416c 100644 --- a/test/cpp/interop/server.cc +++ b/test/cpp/interop/server.cc @@ -203,11 +203,7 @@ void RunServer() { builder.RegisterService(service.service()); if (FLAGS_enable_ssl) { SslServerCredentialsOptions ssl_opts = { - "", - {reinterpret_cast<const char*>(test_server1_key), - test_server1_key_size}, - {reinterpret_cast<const char*>(test_server1_cert), - test_server1_cert_size}}; + "", {{test_server1_key, test_server1_cert}}}; std::shared_ptr<ServerCredentials> creds = ServerCredentialsFactory::SslCredentials(ssl_opts); builder.SetCredentials(creds); diff --git a/test/cpp/util/create_test_channel.cc b/test/cpp/util/create_test_channel.cc index f0d35d98c2..68f6244a53 100644 --- a/test/cpp/util/create_test_channel.cc +++ b/test/cpp/util/create_test_channel.cc @@ -56,11 +56,8 @@ std::shared_ptr<ChannelInterface> CreateTestChannel( ChannelArguments channel_args; if (enable_ssl) { const char* roots_certs = - use_prod_roots ? reinterpret_cast<const char*>(prod_roots_certs) - : reinterpret_cast<const char*>(test_root_cert); - unsigned int roots_certs_size = - use_prod_roots ? prod_roots_certs_size : test_root_cert_size; - SslCredentialsOptions ssl_opts = {{roots_certs, roots_certs_size}, "", ""}; + use_prod_roots ? prod_roots_certs : test_root_cert; + SslCredentialsOptions ssl_opts = {roots_certs, "", ""}; std::unique_ptr<Credentials> creds = CredentialsFactory::SslCredentials(ssl_opts); |