security: Bug fixing

Change-Id: I809fb456c7759f925f28259d3967f49490dc2262
diff --git a/src/security/key-chain.hpp b/src/security/key-chain.hpp
index 6ac1668..d0ae51a 100644
--- a/src/security/key-chain.hpp
+++ b/src/security/key-chain.hpp
@@ -38,8 +38,8 @@
 template<class Info, class Tpm>
 class KeyChainImpl : public Info, public Tpm
 {
-  typedef typename Info::Error InfoError;
-  typedef typename Tpm::Error TpmError;
+  typedef SecPublicInfo::Error InfoError;
+  typedef SecTpm::Error TpmError;
 public:
   /**
    * @brief Create an identity by creating a pair of Key-Signing-Key (KSK) for this identity and a self-signed certificate of the KSK.
diff --git a/src/security/sec-public-info.hpp b/src/security/sec-public-info.hpp
index 1d992d0..e1e0fbe 100644
--- a/src/security/sec-public-info.hpp
+++ b/src/security/sec-public-info.hpp
@@ -365,34 +365,34 @@
   shared_ptr<IdentityCertificate> m_defaultCertificate;
 };
 
-void
+inline void
 SecPublicInfo::setDefaultIdentity(const Name& identityName)
 {
   setDefaultIdentityInternal(identityName);
   refreshDefaultCertificate();
 }
 
-void
+inline void
 SecPublicInfo::setDefaultKeyNameForIdentity(const Name& keyName)
 {
   setDefaultKeyNameForIdentityInternal(keyName);
   refreshDefaultCertificate();
 }
 
-void 
+inline void 
 SecPublicInfo::setDefaultCertificateNameForKey(const Name& certificateName)
 {
   setDefaultCertificateNameForKeyInternal(certificateName);
   refreshDefaultCertificate();
 }
 
-Name 
+inline Name 
 SecPublicInfo::getDefaultCertificateNameForIdentity(const Name& identityName)
 {
   return getDefaultCertificateNameForKey(getDefaultKeyNameForIdentity(identityName));
 }
 
-Name
+inline Name
 SecPublicInfo::getNewKeyName (const Name& identityName, bool useKsk)
 {
   std::ostringstream oss;
@@ -412,7 +412,7 @@
   return keyName;
 }
 
-Name
+inline Name
 SecPublicInfo::getDefaultCertificateName()
 {
   if(!static_cast<bool>(m_defaultCertificate))
@@ -424,7 +424,7 @@
   return m_defaultCertificate->getName();
 }
 
-void
+inline void
 SecPublicInfo::addCertificateAsKeyDefault(const IdentityCertificate& certificate)
 {
   addCertificate(certificate);
@@ -432,7 +432,7 @@
   refreshDefaultCertificate();
 }
 
-void
+inline void
 SecPublicInfo::addCertificateAsIdentityDefault(const IdentityCertificate& certificate)
 {
   addCertificate(certificate);
@@ -442,7 +442,7 @@
   refreshDefaultCertificate();
 }
 
-void
+inline void
 SecPublicInfo::addCertificateAsSystemDefault(const IdentityCertificate& certificate)
 {
   addCertificate(certificate);
@@ -454,13 +454,13 @@
   refreshDefaultCertificate();
 }
 
-shared_ptr<IdentityCertificate>
+inline shared_ptr<IdentityCertificate>
 SecPublicInfo::defaultCertificate()
 {
   return m_defaultCertificate;
 }
 
-void
+inline void
 SecPublicInfo::refreshDefaultCertificate()
 {
   try
diff --git a/src/security/sec-tpm.hpp b/src/security/sec-tpm.hpp
index 2be17d8..97547a4 100644
--- a/src/security/sec-tpm.hpp
+++ b/src/security/sec-tpm.hpp
@@ -261,7 +261,7 @@
   getImpExpPassWord(std::string& password, const std::string& prompt);
 };
 
-bool
+inline bool
 SecTpm::getImpExpPassWord(std::string& password, const std::string& prompt)
 {
   int result = false;
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index f80eb76..9caa380 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -85,11 +85,11 @@
   std::map<Name, shared_ptr<IdentityCertificate> > m_trustAnchors;
 };
 
-void 
+inline void 
 ValidatorRegex::addDataVerificationRule (shared_ptr<SecRuleRelative> rule)
 { rule->isPositive() ? m_verifyPolicies.push_back(rule) : m_mustFailVerify.push_back(rule); }
       
-void  
+inline void  
 ValidatorRegex::addTrustAnchor(shared_ptr<IdentityCertificate> certificate)
 { m_trustAnchors[certificate->getName().getPrefix(-1)] = certificate; }