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/other_tools/just_mr/setup_utils.cpp | |
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/other_tools/just_mr/setup_utils.cpp')
-rw-r--r-- | src/other_tools/just_mr/setup_utils.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/other_tools/just_mr/setup_utils.cpp b/src/other_tools/just_mr/setup_utils.cpp index 1c55c9a3..86e0615c 100644 --- a/src/other_tools/just_mr/setup_utils.cpp +++ b/src/other_tools/just_mr/setup_utils.cpp @@ -32,7 +32,7 @@ void SetupAuthConfig(MultiRepoRemoteAuthArguments const& authargs) noexcept { bool use_tls{false}; if (authargs.tls_ca_cert) { use_tls = true; - if (not Auth::TLS::SetCACertificate(*authargs.tls_ca_cert)) { + if (not Auth::TLS::Instance().SetCACertificate(*authargs.tls_ca_cert)) { Logger::Log(LogLevel::Error, "Could not read '{}' certificate.", authargs.tls_ca_cert->string()); @@ -41,7 +41,8 @@ void SetupAuthConfig(MultiRepoRemoteAuthArguments const& authargs) noexcept { } if (authargs.tls_client_cert) { use_tls = true; - if (not Auth::TLS::SetClientCertificate(*authargs.tls_client_cert)) { + if (not Auth::TLS::Instance().SetClientCertificate( + *authargs.tls_client_cert)) { Logger::Log(LogLevel::Error, "Could not read '{}' certificate.", authargs.tls_client_cert->string()); @@ -50,7 +51,7 @@ void SetupAuthConfig(MultiRepoRemoteAuthArguments const& authargs) noexcept { } if (authargs.tls_client_key) { use_tls = true; - if (not Auth::TLS::SetClientKey(*authargs.tls_client_key)) { + if (not Auth::TLS::Instance().SetClientKey(*authargs.tls_client_key)) { Logger::Log(LogLevel::Error, "Could not read '{}' key.", authargs.tls_client_key->string()); @@ -59,7 +60,7 @@ void SetupAuthConfig(MultiRepoRemoteAuthArguments const& authargs) noexcept { } if (use_tls) { - if (not Auth::TLS::Validate()) { + if (not Auth::TLS::Instance().Validate()) { std::exit(kExitConfigError); } } |