diff --git a/src/sync-intro-certificate.cc b/src/sync-intro-certificate.cc
index 5c966c8..e9587e9 100644
--- a/src/sync-intro-certificate.cc
+++ b/src/sync-intro-certificate.cc
@@ -113,7 +113,7 @@
   if(i >= certificateName.size())
     throw SecException("Wrong SyncIntroCertificate Name!");
 
-  m_keyName = certificateName.getSubName(keyNameStart, keyNameEnd);
+  m_keyName = certificateName.getSubName(keyNameStart, keyNameEnd - keyNameStart);
 
   string typeComponent = certificateName.get(certificateName.size() - 2).toUri();
   if(typeComponent == string("PRODUCER"))
diff --git a/src/sync-policy-manager.cc b/src/sync-policy-manager.cc
index d0ea7c8..a788b66 100644
--- a/src/sync-policy-manager.cc
+++ b/src/sync-policy-manager.cc
@@ -12,6 +12,7 @@
 
 #include "sync-intro-certificate.h"
 #include "sync-logging.h"
+#include <ndn.cxx/security/identity/identity-manager.h>
 
 using namespace ndn;
 using namespace ndn::security;
@@ -27,6 +28,7 @@
   , m_signingCertificateName(signingCertificateName.getPrefix(signingCertificateName.size()-1))
   , m_syncPrefix(syncPrefix)
   , m_stepLimit(stepLimit)
+  , m_identityManager(Ptr<security::IdentityManager>::Create())
 {
   Name wotPrefix = syncPrefix;
   wotPrefix.append("WOT");
@@ -263,9 +265,37 @@
 {
   Ptr<SyncIntroCertificate> introCertificate = Ptr<SyncIntroCertificate>(new SyncIntroCertificate(*introCertificateData));
   if(forIntroducer)
-    m_trustedIntroducers.insert(pair <Name, Publickey > (introCertificate->getPublicKeyName(), introCertificate->getPublicKeyInfo()));
+    {
+      m_trustedIntroducers.insert(pair <Name, Publickey > (introCertificate->getPublicKeyName(), introCertificate->getPublicKeyInfo()));
+      SyncIntroCertificate syncIntroCertificate(m_syncPrefix,
+                                                introCertificate->getPublicKeyName(),
+                                                m_identityManager->getDefaultKeyNameForIdentity(m_signingIdentity),
+                                                introCertificate->getNotBefore(),
+                                                introCertificate->getNotAfter(),
+                                                introCertificate->getPublicKeyInfo(),
+                                                SyncIntroCertificate::INTRODUCER);
+                                                // : SyncIntroCertificate::PRODUCER)
+      ndn::Name certName = m_identityManager->getDefaultCertificateNameByIdentity(m_signingIdentity);
+      _LOG_DEBUG("Publish Intro Certificate on Verified: " << syncIntroCertificate.getName());
+      m_identityManager->signByCertificate(syncIntroCertificate, certName);
+      m_handler->putToNdnd(*syncIntroCertificate.encodeToWire());
+    }
   else
-    m_trustedProducers.insert(pair <Name, Publickey > (introCertificate->getPublicKeyName(), introCertificate->getPublicKeyInfo()));
+    {
+      m_trustedProducers.insert(pair <Name, Publickey > (introCertificate->getPublicKeyName(), introCertificate->getPublicKeyInfo()));
+      SyncIntroCertificate syncIntroCertificate(m_syncPrefix,
+                                                introCertificate->getPublicKeyName(),
+                                                m_identityManager->getDefaultKeyNameForIdentity(m_signingIdentity),
+                                                introCertificate->getNotBefore(),
+                                                introCertificate->getNotAfter(),
+                                                introCertificate->getPublicKeyInfo(),
+                                                SyncIntroCertificate::PRODUCER);
+      // : SyncIntroCertificate::PRODUCER)
+      ndn::Name certName = m_identityManager->getDefaultCertificateNameByIdentity(m_signingIdentity);
+      _LOG_DEBUG("Publish Intro Certificate on Verified: " << syncIntroCertificate.getName());
+      m_identityManager->signByCertificate(syncIntroCertificate, certName);
+      m_handler->putToNdnd(*syncIntroCertificate.encodeToWire());
+    }
 
   if(verifySignature(*originalData, introCertificate->getPublicKeyInfo()))      
     verifiedCallback(originalData);    
diff --git a/src/sync-policy-manager.h b/src/sync-policy-manager.h
index fac9b4a..ad4345a 100644
--- a/src/sync-policy-manager.h
+++ b/src/sync-policy-manager.h
@@ -118,6 +118,7 @@
   std::map<ndn::Name, ndn::security::Publickey> m_trustedProducers;
   std::map<ndn::Name, SpecificPolicyRule> m_chatDataRules;
 
+  ndn::Ptr<ndn::security::IdentityManager> m_identityManager;
   ndn::Ptr<ndn::Wrapper> m_handler;
 };
 
