summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/server_implementation.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-06-27 16:05:05 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-04 16:05:08 +0200
commit0cbc8e226b39ec731373b80024e23cc0580c27ac (patch)
treefa6737a19491b8e062704f728243689429d4069c /src/buildtool/execution_api/execution_service/server_implementation.cpp
parent74f53b444853850144c3e63593f83c424e84a768 (diff)
downloadjustbuild-0cbc8e226b39ec731373b80024e23cc0580c27ac.tar.gz
Use Auth and TLS configurations via Instance()
...to more easily keep track of changes during refactoring.
Diffstat (limited to 'src/buildtool/execution_api/execution_service/server_implementation.cpp')
-rw-r--r--src/buildtool/execution_api/execution_service/server_implementation.cpp7
1 files changed, 4 insertions, 3 deletions
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<grpc::ServerCredentials> 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);