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

certstore: handle errors in readCertificates

Change-Id: I585fefb88dbcab2317a3b0c4a6564e75ce008eeb
parent 62aefa69
No related branches found
No related tags found
No related merge requests found
......@@ -252,7 +252,8 @@ readCertificates(const std::filesystem::path& path, const std::string& crl_path)
{
std::vector<crypto::Certificate> ret;
if (std::filesystem::is_directory(path)) {
for (const auto& file : std::filesystem::directory_iterator(path)) {
std::error_code ec;
for (const auto& file : std::filesystem::directory_iterator(path, ec)) {
auto certs = readCertificates(file, crl_path);
ret.insert(std::end(ret),
std::make_move_iterator(std::begin(certs)),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment