Skip to content
Snippets Groups Projects
Commit 036612b0 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

certstore: cleanup

Change-Id: Ic9bd9a2b570b334cd84652cae97c9a1ffe3350b5
parent b23278d2
Branches
No related tags found
No related merge requests found
......@@ -148,9 +148,7 @@ CertificateStore::getCertificate(const std::string& k)
{
auto getCertificate_ = [this](const std::string& k) -> std::shared_ptr<crypto::Certificate> {
auto cit = certs_.find(k);
if (cit == certs_.cend())
return {};
return cit->second;
return cit != certs_.cend() ? cit->second : std::shared_ptr<crypto::Certificate>{};
};
std::unique_lock<std::mutex> l(lock_);
auto crt = getCertificate_(k);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment