Adding direct trust mechanism in invitation, if two are already each other's trusted contacts, then they can talk to each other without fetching keys
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index a2a554c..8e7de21 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -303,6 +303,17 @@
return;
}
+ Ptr<security::Publickey> keyPtr = m_panelPolicyManager->getTrustedKey(invitation->getInviterCertificateName());
+ if(NULL != keyPtr && security::PolicyManager::verifySignature(invitation->getSignedBlob(), invitation->getSignatureBits(), *keyPtr))
+ {
+ Ptr<security::IdentityCertificate> certificate = Ptr<security::IdentityCertificate>::Create();
+ // hack: incomplete certificate, we don't send it to the wire nor store it anywhere
+ certificate->setName(invitation->getInviterCertificateName());
+ certificate->setPublicKeyInfo(*keyPtr);
+ popChatInvitation(invitation, invitation->getInviterNameSpace(), certificate);
+ return;
+ }
+
Ptr<Interest> newInterest = Ptr<Interest>(new Interest(invitation->getInviterCertificateName()));
Ptr<Closure> closure = Ptr<Closure>(new Closure(boost::bind(&ContactPanel::onInvitationCertVerified,
this,