diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index 3c87c46..9016eb6 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -9,6 +9,10 @@
  */
 
 #include "invitation-policy-manager.h"
+
+#include <ndn.cxx/security/certificate/identity-certificate.h>
+#include <boost/bind.hpp>
+
 #include "logging.h"
 
 using namespace std;
@@ -18,19 +22,21 @@
 INIT_LOGGER("InvitationPolicyManager");
 
 InvitationPolicyManager::InvitationPolicyManager(const int & stepLimit,
-						 Ptr<CertificateCache> certificateCache,
-						 Name signingIdentity)
+						 Ptr<CertificateCache> certificateCache)
   : m_stepLimit(stepLimit)
   , m_certificateCache(certificateCache)
   , m_localPrefixRegex(Ptr<Regex>(new Regex("^<local><ndn><prefix><><>$")))
 {
   m_invitationDataRule = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^<ndn><broadcast><chronos><invitation>([^<chatroom>]*)<chatroom>", 
-									"^([^<KEY>]*)<KEY><DSK-.*><ID-CERT>$", 
+									"^([^<KEY>]*)<KEY><DSK-.*><ID-CERT><>$", 
 									"==", "\\1", "\\1", true));
   
-  m_dskRule = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY><DSK-.*><ID-CERT>$", 
-							     "^([^<KEY>]*)<KEY>(<>*)<KSK-.*><ID-CERT>$", 
+  m_dskRule = Ptr<IdentityPolicyRule>(new IdentityPolicyRule("^([^<KEY>]*)<KEY><DSK-.*><ID-CERT><>$", 
+							     "^([^<KEY>]*)<KEY>(<>*)<KSK-.*><ID-CERT><>$", 
 							     "==", "\\1", "\\1\\2", true));
+
+  m_keyNameRegex = Ptr<Regex>(new Regex("^([^<KEY>]*)<KEY>(<>*<KSK-.*>)<ID-CERT><>$", "\\1\\2"));
+
   m_signingCertificateRegex = Ptr<Regex>(new Regex("^<ndn><broadcast><chronos><invitation>([^<chatroom>]*)<chatroom>", "\\1"));
 }
 
@@ -121,22 +127,22 @@
 
   if(m_dskRule->satisfy(*data))
     {
-      Ptr<IdentityCertificate> trustedCert;
-      if(m_trustAnchors.end() != m_trustAnchors.find(keyLocatorName))
-	trustedCert = m_trustAnchors[keyLocatorName];
-      else
-	{
-	  unverifiedCallback(data);
-	  return NULL;
-	}
+      m_keyNameRegex->match(keyLocatorName);
+      Name keyName = m_keyNameRegex->expand();
 
-      if(verifySignature(*data, trustedCert->getPublicKeyInfo()))
-	verifiedCallback(data);
+      if(m_trustAnchors.end() != m_trustAnchors.find(keyName))
+        if(verifySignature(*data, m_trustAnchors[keyName]))
+          verifiedCallback(data);
+        else
+          unverifiedCallback(data);
       else
-	unverifiedCallback(data);
+        unverifiedCallback(data);
 
       return NULL;	
     }
+
+  unverifiedCallback(data);
+  return NULL;
 }
 
 void 
@@ -151,8 +157,6 @@
     verifiedCallback(originalData);
   else
     unverifiedCallback(originalData);
-
-  return NULL;
 }
 
 void
@@ -170,15 +174,12 @@
 Name 
 InvitationPolicyManager::inferSigningIdentity(const Name & dataName)
 {
-  if(m_signingCertificateRegex->match(data))
+  if(m_signingCertificateRegex->match(dataName))
     return m_signingCertificateRegex->expand();
   else
     return Name();
 }
 
 void
-InvitationPolicyManager::addTrustAnchor(Ptr<IdentityCertificate> ksk)
-{
-  Name name = ksk->getName();    
-  m_cache.insert(pair <Name, Ptr<IdentityCertificate> > (name, ksk));
-}
+InvitationPolicyManager::addTrustAnchor(const EndorseCertificate& selfEndorseCertificate)
+{ m_trustAnchors.insert(pair <Name, Publickey > (selfEndorseCertificate.getPublicKeyName(), selfEndorseCertificate.getPublicKeyInfo())); }
