security: Make public interface of Pib, Identity, and Key as read-only

Change-Id: I7b3fac583c00cce2fa09802fa4d0aff2ace4aca2
Refs: #2928
diff --git a/src/security/key.cpp b/src/security/key.cpp
index d7a1a6f..dc430c7 100644
--- a/src/security/key.cpp
+++ b/src/security/key.cpp
@@ -127,15 +127,15 @@
 }
 
 IdentityCertificate
-Key::getCertificate(const Name& certName)
+Key::getCertificate(const Name& certName) const
 {
   validityCheck();
 
   return m_impl->getCertificate(certName);
 }
 
-CertificateContainer
-Key::getCertificates()
+const CertificateContainer&
+Key::getCertificates() const
 {
   validityCheck();
 
@@ -167,7 +167,7 @@
 }
 
 const IdentityCertificate&
-Key::getDefaultCertificate()
+Key::getDefaultCertificate() const
 {
   validityCheck();