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. --- .../execution_api/execution_service/server_implementation.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp') diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp index 7a9745db..30974d4f 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.cpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp @@ -72,12 +72,13 @@ auto ServerImpl::Run(ApiBundle const& apis) -> bool { .RegisterService(&op); std::shared_ptr creds; - if (Auth::GetAuthMethod() == AuthMethod::kTLS) { + if (Auth::Instance().GetAuthMethod() == AuthMethod::kTLS) { auto tls_opts = grpc::SslServerCredentialsOptions{}; - tls_opts.pem_root_certs = Auth::TLS::CACert(); + tls_opts.pem_root_certs = Auth::TLS::Instance().CACert(); grpc::SslServerCredentialsOptions::PemKeyCertPair keycert = { - Auth::TLS::ServerKey(), Auth::TLS::ServerCert()}; + Auth::TLS::Instance().ServerKey(), + Auth::TLS::Instance().ServerCert()}; tls_opts.pem_key_cert_pairs.emplace_back(keycert); -- cgit v1.2.3