diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-06-27 16:05:05 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-04 16:05:08 +0200 |
commit | 0cbc8e226b39ec731373b80024e23cc0580c27ac (patch) | |
tree | fa6737a19491b8e062704f728243689429d4069c /src/buildtool/common/remote/client_common.hpp | |
parent | 74f53b444853850144c3e63593f83c424e84a768 (diff) | |
download | justbuild-0cbc8e226b39ec731373b80024e23cc0580c27ac.tar.gz |
Use Auth and TLS configurations via Instance()
...to more easily keep track of changes during refactoring.
Diffstat (limited to 'src/buildtool/common/remote/client_common.hpp')
-rw-r--r-- | src/buildtool/common/remote/client_common.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<grpc::ChannelCredentials> 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 { |