Skip to content
Snippets Groups Projects
Commit 4b2cc45f authored by Sébastien Blin's avatar Sébastien Blin
Browse files

conversation: pinCertificates must be blocking before reload

In the current code, if pinCertificate is too slow, the following
getCertificate will fail.

jami-client-qt#340

Change-Id: I0813b5984b4a6952373c7bd0fad3748950139784
parent 0c98f2b1
No related branches found
No related tags found
No related merge requests found
......@@ -379,12 +379,14 @@ Conversation::Impl::convCommitToMap(const ConversationCommit& commit) const
if (!cert || !cert->issuer) {
JAMI_WARN("No author found for commit %s, reload certificates", commit.id.c_str());
if (repository_)
repository_->pinCertificates();
repository_->pinCertificates(true);
// Get certificate from repo
try {
cert = tls::CertificateStore::instance().getCertificate(authorDevice);
if (!cert || !cert->issuer) {
JAMI_ERR("No author found for commit %s", commit.id.c_str());
JAMI_ERR("No author found for commit %s (device: %s)",
commit.id.c_str(),
authorDevice.c_str());
return std::nullopt;
}
} catch (...) {
......
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