|
|
@ -34,15 +34,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
namespace { |
|
|
|
namespace { |
|
|
|
|
|
|
|
|
|
|
|
typedef class ::grpc_impl::experimental::TlsKeyMaterialsConfig |
|
|
|
typedef class ::grpc::experimental::TlsKeyMaterialsConfig |
|
|
|
TlsKeyMaterialsConfig; |
|
|
|
TlsKeyMaterialsConfig; |
|
|
|
typedef class ::grpc_impl::experimental::TlsCredentialReloadArg |
|
|
|
typedef class ::grpc::experimental::TlsCredentialReloadArg |
|
|
|
TlsCredentialReloadArg; |
|
|
|
TlsCredentialReloadArg; |
|
|
|
typedef struct ::grpc_impl::experimental::TlsCredentialReloadInterface |
|
|
|
typedef struct ::grpc::experimental::TlsCredentialReloadInterface |
|
|
|
TlsCredentialReloadInterface; |
|
|
|
TlsCredentialReloadInterface; |
|
|
|
typedef class ::grpc_impl::experimental::TlsServerAuthorizationCheckArg |
|
|
|
typedef class ::grpc::experimental::TlsServerAuthorizationCheckArg |
|
|
|
TlsServerAuthorizationCheckArg; |
|
|
|
TlsServerAuthorizationCheckArg; |
|
|
|
typedef struct ::grpc_impl::experimental::TlsServerAuthorizationCheckInterface |
|
|
|
typedef struct ::grpc::experimental::TlsServerAuthorizationCheckInterface |
|
|
|
TlsServerAuthorizationCheckInterface; |
|
|
|
TlsServerAuthorizationCheckInterface; |
|
|
|
|
|
|
|
|
|
|
|
static void tls_credential_reload_callback( |
|
|
|
static void tls_credential_reload_callback( |
|
|
@ -131,7 +131,7 @@ TEST_F(CredentialsTest, StsCredentialsOptionsCppToCore) { |
|
|
|
options.actor_token_path = "/foo/baz"; |
|
|
|
options.actor_token_path = "/foo/baz"; |
|
|
|
options.actor_token_type = "even_nicer_token_type"; |
|
|
|
options.actor_token_type = "even_nicer_token_type"; |
|
|
|
grpc_sts_credentials_options core_opts = |
|
|
|
grpc_sts_credentials_options core_opts = |
|
|
|
grpc_impl::experimental::StsCredentialsCppToCoreOptions(options); |
|
|
|
grpc::experimental::StsCredentialsCppToCoreOptions(options); |
|
|
|
EXPECT_EQ(options.token_exchange_service_uri, |
|
|
|
EXPECT_EQ(options.token_exchange_service_uri, |
|
|
|
core_opts.token_exchange_service_uri); |
|
|
|
core_opts.token_exchange_service_uri); |
|
|
|
EXPECT_EQ(options.resource, core_opts.resource); |
|
|
|
EXPECT_EQ(options.resource, core_opts.resource); |
|
|
@ -271,7 +271,7 @@ TEST_F(CredentialsTest, StsCredentialsOptionsFromEnv) { |
|
|
|
gpr_unsetenv("STS_CREDENTIALS"); |
|
|
|
gpr_unsetenv("STS_CREDENTIALS"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
typedef class ::grpc_impl::experimental::TlsKeyMaterialsConfig |
|
|
|
typedef class ::grpc::experimental::TlsKeyMaterialsConfig |
|
|
|
TlsKeyMaterialsConfig; |
|
|
|
TlsKeyMaterialsConfig; |
|
|
|
|
|
|
|
|
|
|
|
TEST_F(CredentialsTest, TlsKeyMaterialsConfigCppToC) { |
|
|
|
TEST_F(CredentialsTest, TlsKeyMaterialsConfigCppToC) { |
|
|
@ -304,9 +304,9 @@ TEST_F(CredentialsTest, TlsKeyMaterialsModifiers) { |
|
|
|
EXPECT_STREQ(list[0].cert_chain.c_str(), "cert_chain"); |
|
|
|
EXPECT_STREQ(list[0].cert_chain.c_str(), "cert_chain"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
typedef class ::grpc_impl::experimental::TlsCredentialReloadArg |
|
|
|
typedef class ::grpc::experimental::TlsCredentialReloadArg |
|
|
|
TlsCredentialReloadArg; |
|
|
|
TlsCredentialReloadArg; |
|
|
|
typedef class ::grpc_impl::experimental::TlsCredentialReloadConfig |
|
|
|
typedef class ::grpc::experimental::TlsCredentialReloadConfig |
|
|
|
TlsCredentialReloadConfig; |
|
|
|
TlsCredentialReloadConfig; |
|
|
|
|
|
|
|
|
|
|
|
TEST_F(CredentialsTest, TlsCredentialReloadArgCallback) { |
|
|
|
TEST_F(CredentialsTest, TlsCredentialReloadArgCallback) { |
|
|
@ -433,9 +433,9 @@ TEST_F(CredentialsTest, TlsCredentialReloadConfigCppToC) { |
|
|
|
delete config.c_config(); |
|
|
|
delete config.c_config(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
typedef class ::grpc_impl::experimental::TlsServerAuthorizationCheckArg |
|
|
|
typedef class ::grpc::experimental::TlsServerAuthorizationCheckArg |
|
|
|
TlsServerAuthorizationCheckArg; |
|
|
|
TlsServerAuthorizationCheckArg; |
|
|
|
typedef class ::grpc_impl::experimental::TlsServerAuthorizationCheckConfig |
|
|
|
typedef class ::grpc::experimental::TlsServerAuthorizationCheckConfig |
|
|
|
TlsServerAuthorizationCheckConfig; |
|
|
|
TlsServerAuthorizationCheckConfig; |
|
|
|
|
|
|
|
|
|
|
|
TEST_F(CredentialsTest, TlsServerAuthorizationCheckArgCallback) { |
|
|
|
TEST_F(CredentialsTest, TlsServerAuthorizationCheckArgCallback) { |
|
|
@ -550,7 +550,7 @@ TEST_F(CredentialsTest, TlsServerAuthorizationCheckConfigCppToC) { |
|
|
|
delete config.c_config(); |
|
|
|
delete config.c_config(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
typedef class ::grpc_impl::experimental::TlsCredentialsOptions |
|
|
|
typedef class ::grpc::experimental::TlsCredentialsOptions |
|
|
|
TlsCredentialsOptions; |
|
|
|
TlsCredentialsOptions; |
|
|
|
|
|
|
|
|
|
|
|
TEST_F(CredentialsTest, TlsCredentialsOptionsCppToC) { |
|
|
|
TEST_F(CredentialsTest, TlsCredentialsOptionsCppToC) { |
|
|
@ -681,7 +681,7 @@ TEST_F(CredentialsTest, LoadTlsChannelCredentials) { |
|
|
|
TlsCredentialsOptions options = TlsCredentialsOptions( |
|
|
|
TlsCredentialsOptions options = TlsCredentialsOptions( |
|
|
|
GRPC_TLS_SERVER_VERIFICATION, nullptr, credential_reload_config, |
|
|
|
GRPC_TLS_SERVER_VERIFICATION, nullptr, credential_reload_config, |
|
|
|
server_authorization_check_config); |
|
|
|
server_authorization_check_config); |
|
|
|
std::shared_ptr<grpc_impl::ChannelCredentials> channel_credentials = |
|
|
|
std::shared_ptr<grpc::ChannelCredentials> channel_credentials = |
|
|
|
grpc::experimental::TlsCredentials(options); |
|
|
|
grpc::experimental::TlsCredentials(options); |
|
|
|
GPR_ASSERT(channel_credentials.get() != nullptr); |
|
|
|
GPR_ASSERT(channel_credentials.get() != nullptr); |
|
|
|
} |
|
|
|
} |
|
|
|