Skip to content
Snippets Groups Projects
Commit ef441f56 authored by Alexandre Eberhardt's avatar Alexandre Eberhardt Committed by Adrien Béraud
Browse files

certificat: add error log if certificate verification fails

Change-Id: If48f902ab7f80afd11b840f00193ef5a98cda62e
parent 94591e47
No related branches found
No related tags found
No related merge requests found
......@@ -150,8 +150,14 @@ JamiPluginManager::checkPluginCertificatePublicKey(const std::string& oldJplPath
bool
JamiPluginManager::checkPluginCertificateValidity(dht::crypto::Certificate* cert)
{
if (!cert || !*cert)
return false;
trust_.add(crypto::Certificate(store_ca_crt, sizeof(store_ca_crt)));
return cert && *cert && trust_.verify(*cert);
auto result = trust_.verify(*cert);
if (!result) {
JAMI_ERROR("Certificate verification failed: {}", result.toString());
}
return (bool)result;
}
std::map<std::string, std::string>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment