From 0cbc8e226b39ec731373b80024e23cc0580c27ac Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 27 Jun 2024 16:05:05 +0200 Subject: Use Auth and TLS configurations via Instance() ...to more easily keep track of changes during refactoring. --- src/buildtool/common/remote/client_common.hpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/buildtool/common/remote/client_common.hpp') diff --git a/src/buildtool/common/remote/client_common.hpp b/src/buildtool/common/remote/client_common.hpp index bd962e8d..eb4af68f 100644 --- a/src/buildtool/common/remote/client_common.hpp +++ b/src/buildtool/common/remote/client_common.hpp @@ -36,10 +36,11 @@ std::shared_ptr creds; std::string address = server + ':' + std::to_string(port); - if (Auth::GetAuthMethod() == AuthMethod::kTLS) { - auto tls_opts = grpc::SslCredentialsOptions{Auth::TLS::CACert(), - Auth::TLS::ClientKey(), - Auth::TLS::ClientCert()}; + if (Auth::Instance().GetAuthMethod() == AuthMethod::kTLS) { + auto tls_opts = + grpc::SslCredentialsOptions{Auth::TLS::Instance().CACert(), + Auth::TLS::Instance().ClientKey(), + Auth::TLS::Instance().ClientCert()}; creds = grpc::SslCredentials(tls_opts); } else { -- cgit v1.2.3