Add functionality of endorsement
diff --git a/src/contact-item.cpp b/src/contact-item.cpp
index eb342d6..839988c 100644
--- a/src/contact-item.cpp
+++ b/src/contact-item.cpp
@@ -28,34 +28,34 @@
, m_isIntroducer(isIntroducer)
{
Name endorsedkeyName = selfEndorseCertificate.getPublicKeyName();
- Ptr<const signature::Sha256WithRsa> endorseSig = boost::dynamic_pointer_cast<const signature::Sha256WithRsa>(selfEndorseCertificate.getSignature());
- const Name& signingKeyName = endorseSig->getKeyLocator().getKeyName();
+ // Ptr<const signature::Sha256WithRsa> endorseSig = boost::dynamic_pointer_cast<const signature::Sha256WithRsa>(selfEndorseCertificate.getSignature());
+ // const Name& signingKeyName = endorseSig->getKeyLocator().getKeyName();
- int i = 0;
- int j = -1;
- string keyString("KEY");
- string idString("ID-CERT");
- for(; i < signingKeyName.size(); i++)
- {
- if(keyString == signingKeyName.get(i).toUri())
- j = i;
- if(idString == signingKeyName.get(i).toUri())
- break;
- }
+ // int i = 0;
+ // int j = -1;
+ // string keyString("KEY");
+ // string idString("ID-CERT");
+ // for(; i < signingKeyName.size(); i++)
+ // {
+ // if(keyString == signingKeyName.get(i).toUri())
+ // j = i;
+ // if(idString == signingKeyName.get(i).toUri())
+ // break;
+ // }
- if(i >= signingKeyName.size() || j < 0)
- throw LnException("Wrong name!");
+ // if(i >= signingKeyName.size() || j < 0)
+ // throw LnException("Wrong name!");
- Name subName = signingKeyName.getSubName(0, j);
- subName.append(signingKeyName.getSubName(j+1, i-j-1));
+ // Name subName = signingKeyName.getSubName(0, j);
+ // subName.append(signingKeyName.getSubName(j+1, i-j-1));
- // _LOG_DEBUG("endorsedkeyName " << endorsedkeyName.toUri());
- // _LOG_DEBUG("subKeyName " << subName.toUri());
+ // // _LOG_DEBUG("endorsedkeyName " << endorsedkeyName.toUri());
+ // // _LOG_DEBUG("subKeyName " << subName.toUri());
- if(endorsedkeyName != subName)
- throw LnException("not a self-claimed");
+ // if(endorsedkeyName != subName)
+ // throw LnException("not a self-claimed");
m_namespace = endorsedkeyName.getSubName(0, endorsedkeyName.size() - 1);
m_alias = alias.empty() ? m_namespace.toUri() : alias;