Fixing some bugs causing segment faults, and update ChronoSync. Now it should work, but we need to run more tests to see if there are some other bugs.
Change-Id: Ib06603cb7262a7f38abe42be94da685f18eab65d
diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index cd86cbd..0885e25 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -79,20 +79,20 @@
if(m_invitationPolicyRule->satisfy(*data))
{
// Name keyName = IdentityCertificate::certificateNameToPublicKeyName(keyLocatorName);
- // map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
+ // map<Name, PublicKey>::iterator it = m_trustAnchors.find(keyName);
// if(m_trustAnchors.end() != it)
// {
- // if(verifySignature(*data, it->second))
- // verifiedCallback(data);
+ // if(Sha256WithRsaHandler::verifySignature(*data, it->second))
+ // onVerified(data);
// else
- // unverifiedCallback(data);
+ // onVerifyFailed(data);
- // return NULL;
+ // return CHRONOCHAT_NULL_VALIDATIONREQUEST_PTR;
// }
shared_ptr<const Certificate> trustedCert = m_certificateCache.getCertificate(keyLocatorName);
- if(!trustedCert){
+ if(trustedCert != ndn::TCC_NULL_CERTIFICATE_PTR){
if(Sha256WithRsaHandler::verifySignature(*data, trustedCert->getPublicKeyInfo()))
onVerified(data);
else