diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 9b7d7a3..af094a7 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -171,6 +171,20 @@
   return result;
 }
 
+Ptr<ContactItem>
+ContactManager::getContact(const ndn::Name& contactNamespace)
+{
+  Ptr<ContactItem> contactItem = m_contactStorage->getNormalContact(contactNamespace);
+  if(NULL != contactItem)
+    return contactItem;
+  
+  contactItem = m_contactStorage->getTrustedContact(contactNamespace);
+  if(NULL != contactItem)
+    return contactItem;
+  
+  return NULL;
+}
+
 Ptr<EndorseCertificate>
 ContactManager::getSignedSelfEndorseCertificate(const Name& identity,
                                                 const Profile& profile)
diff --git a/src/contact-manager.h b/src/contact-manager.h
index 666cf9b..465a1cc 100644
--- a/src/contact-manager.h
+++ b/src/contact-manager.h
@@ -46,6 +46,9 @@
   getContactStorage()
   { return m_contactStorage; }
 
+  ndn::Ptr<ContactItem>
+  getContact(const ndn::Name& contactNamespace);
+
   inline ndn::Ptr<DnsStorage>
   getDnsStorage()
   { return m_dnsStorage; }
diff --git a/src/contact-storage.cpp b/src/contact-storage.cpp
index 24c322e..7a24fdc 100644
--- a/src/contact-storage.cpp
+++ b/src/contact-storage.cpp
@@ -366,6 +366,53 @@
   return normalContacts;
 }
 
+Ptr<ContactItem>
+ContactStorage::getNormalContact(const Name& name)
+{
+  sqlite3_stmt *stmt;
+  sqlite3_prepare_v2 (m_db, 
+                      "SELECT contact_alias, self_certificate FROM NormalContact where contact_namespace=?", 
+                      -1, 
+                      &stmt, 
+                      0);
+  sqlite3_bind_text (stmt, 1, name.toUri().c_str(), name.toUri().size(), SQLITE_TRANSIENT);
+  
+  if( sqlite3_step (stmt) == SQLITE_ROW)
+    {
+      string alias(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0));
+      Ptr<Blob> certBlob = Ptr<Blob>(new Blob(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 1)), sqlite3_column_bytes (stmt, 1)));
+      Ptr<Data> certData = Data::decodeFromWire(certBlob);
+      EndorseCertificate endorseCertificate(*certData);
+
+      return Ptr<ContactItem>(new ContactItem(endorseCertificate, alias));      
+    } 
+  return NULL;
+}
+
+Ptr<TrustedContact>
+ContactStorage::getTrustedContact(const Name& name)
+{
+  sqlite3_stmt *stmt;
+  sqlite3_prepare_v2 (m_db, 
+                      "SELECT contact_alias, self_certificate, trust_scope FROM TrustedContact where contact_namespace=?", 
+                      -1, 
+                      &stmt, 
+                      0);
+  sqlite3_bind_text (stmt, 1, name.toUri().c_str(), name.toUri().size(), SQLITE_TRANSIENT);
+  
+  if( sqlite3_step (stmt) == SQLITE_ROW)
+    {
+      string alias(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 0)), sqlite3_column_bytes (stmt, 0));
+      Ptr<Blob> certBlob = Ptr<Blob>(new Blob(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 1)), sqlite3_column_bytes (stmt, 1)));
+      Ptr<Data> certData = Data::decodeFromWire(certBlob);
+      EndorseCertificate endorseCertificate(*certData);
+      string trustScope(reinterpret_cast<const char *>(sqlite3_column_text(stmt, 2)), sqlite3_column_bytes (stmt, 2));
+
+      return Ptr<TrustedContact>(new TrustedContact(endorseCertificate, trustScope, alias));      
+    }
+  return NULL;
+}
+
 Ptr<Profile>
 ContactStorage::getSelfProfile(const Name& identity) const
 {  
diff --git a/src/contact-storage.h b/src/contact-storage.h
index e08790e..d0f5f5b 100644
--- a/src/contact-storage.h
+++ b/src/contact-storage.h
@@ -48,6 +48,12 @@
 
   std::vector<ndn::Ptr<ContactItem> >
   getAllNormalContacts() const;
+
+  ndn::Ptr<ContactItem>
+  getNormalContact(const ndn::Name& name);
+
+  ndn::Ptr<TrustedContact>
+  getTrustedContact(const ndn::Name& name);
     
   ndn::Ptr<Profile>
   getSelfProfile(const ndn::Name& identity) const;
