From fcbb9fec778723f9f5ae0c1589f648e3c77b9356 Mon Sep 17 00:00:00 2001 From: Yash Tibrewal Date: Wed, 28 Oct 2020 15:02:01 -0700 Subject: [PATCH] Cleanup TlsCredentialsOptions --- .../credentials/tls/grpc_tls_credentials_options.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h index 30a6c9a446a..c67238423e3 100644 --- a/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +++ b/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h @@ -116,14 +116,9 @@ struct grpc_tls_credentials_options server_authorization_check_config() const { return server_authorization_check_config_.get(); } - // This will be used by the security connector to get the correct distributor. - // It can be applied to both the Tls*Creds and the Xds*Creds cases. - // For Tls*Creds case, we will get the distributor from the provider; - // For Xds*Creds case, there will be a level of indirection between the - // provider and the distributor, so we will get the distributor directly. + // Returns the distributor from provider_ if it is set, nullptr otherwise. grpc_tls_certificate_distributor* certificate_distributor() { if (provider_ != nullptr) return provider_->distributor().get(); - if (distributor_ != nullptr) return distributor_.get(); return nullptr; } bool watch_root_cert() { return watch_root_cert_; } @@ -157,12 +152,6 @@ struct grpc_tls_credentials_options grpc_core::RefCountedPtr provider) { provider_ = std::move(provider); } - // Sets the distributor in the options. - // This should only be used by the xDS code for Xds*Creds case. - void set_certificate_distributor( - grpc_core::RefCountedPtr distributor) { - distributor_ = std::move(distributor); - } // If need to watch the updates of root certificates with name // |root_cert_name|. The default value is false. If used in tls_credentials, // it should always be set to true unless the root certificates are not @@ -196,7 +185,6 @@ struct grpc_tls_credentials_options grpc_core::RefCountedPtr server_authorization_check_config_; grpc_core::RefCountedPtr provider_; - grpc_core::RefCountedPtr distributor_; bool watch_root_cert_ = false; std::string root_cert_name_; bool watch_identity_pair_ = false;