diff --git a/include/ndn-cpp/security/certificate/certificate.hpp b/include/ndn-cpp/security/certificate/certificate.hpp
index 0c7323b..c2fd95a 100644
--- a/include/ndn-cpp/security/certificate/certificate.hpp
+++ b/include/ndn-cpp/security/certificate/certificate.hpp
@@ -18,11 +18,13 @@
 
 namespace ndn {
 
-typedef std::vector<CertificateSubjectDescription> SubjectDescriptionList;
-typedef std::vector<CertificateExtension> ExtensionList;
-
 class Certificate : public Data {
 public:
+  struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
+
+  typedef std::vector<CertificateSubjectDescription> SubjectDescriptionList;
+  typedef std::vector<CertificateExtension> ExtensionList;
+
   /**
    * The default constructor.
    */
@@ -40,6 +42,9 @@
   virtual 
   ~Certificate();
 
+  inline void
+  wireDecode(const Block &wire);
+  
   /**
    * encode certificate info into content
    */
@@ -117,7 +122,7 @@
   isTooLate();
 
   void 
-  printCertificate();
+  printCertificate(std::ostream &os) const;
 
 protected:
   void
@@ -131,6 +136,21 @@
   ExtensionList extensionList_;
 };
 
+inline void
+Certificate::wireDecode(const Block &wire)
+{
+  Data::wireDecode(wire);
+  decode();
 }
 
+
+inline std::ostream&
+operator <<(std::ostream &os, const Certificate &cert)
+{
+  cert.printCertificate(os);
+  return os;
+}
+
+} // namespace ndn
+
 #endif
diff --git a/include/ndn-cpp/security/certificate/identity-certificate.hpp b/include/ndn-cpp/security/certificate/identity-certificate.hpp
index 4d3a9db..85c8e72 100644
--- a/include/ndn-cpp/security/certificate/identity-certificate.hpp
+++ b/include/ndn-cpp/security/certificate/identity-certificate.hpp
@@ -16,12 +16,13 @@
 class IdentityCertificate : public Certificate
 {
 public:
+  struct Error : public std::runtime_error { Error(const std::string &what) : std::runtime_error(what) {} };
+
   /**
    * The default constructor.
    */
-  IdentityCertificate()
-  {
-  }
+  inline
+  IdentityCertificate();
 
   // Note: The copy constructor works because publicKeyName_ has a copy constructor.
 
@@ -29,29 +30,20 @@
    * Create an IdentityCertificate from the content in the data packet.
    * @param data The data packet with the content to decode.
    */
+  inline
   IdentityCertificate(const Data& data);
   
   /**
-   * The copy constructor. 
-   */
-  IdentityCertificate(const IdentityCertificate& identityCertificate);
-  
-  /**
    * The virtual destructor.
    */
-  virtual 
+  inline virtual 
   ~IdentityCertificate();
   
-  /**
-   * Override the base class method to check that the name is a valid identity certificate name.
-   * @param name The identity certificate name which is copied.
-   * @return This Data so that you can chain calls to update values.
-   */
-  virtual Data &
-  setName(const Name& name);
-
-  Name 
-  getPublicKeyName () const { return publicKeyName_; }
+  inline void
+  wireDecode(const Block &wire);
+  
+  inline const Name &
+  getPublicKeyName () const;
 
   static bool
   isIdentityCertificate(const Certificate& certificate);
@@ -75,6 +67,36 @@
   Name publicKeyName_;
 };
 
+inline
+IdentityCertificate::IdentityCertificate()
+{
+}
+
+inline
+IdentityCertificate::IdentityCertificate(const Data& data)
+  : Certificate(data)
+{
+  setPublicKeyName();
+}
+  
+inline
+IdentityCertificate::~IdentityCertificate()
+{
+}
+
+inline void
+IdentityCertificate::wireDecode(const Block &wire)
+{
+  Certificate::wireDecode(wire);
+  setPublicKeyName();
+}
+
+inline const Name &
+IdentityCertificate::getPublicKeyName () const
+{
+  return publicKeyName_;
+}
+
 }
 
 #endif
diff --git a/include/ndn-cpp/security/certificate/public-key.hpp b/include/ndn-cpp/security/certificate/public-key.hpp
index 43e1223..1fac1ec 100644
--- a/include/ndn-cpp/security/certificate/public-key.hpp
+++ b/include/ndn-cpp/security/certificate/public-key.hpp
@@ -33,13 +33,13 @@
    */
   PublicKey(const uint8_t *keyDerBuf, size_t keyDerSize);
 
-  const Buffer&
+  inline const Buffer&
   get() const
   {
     return key_;
   }
 
-  void
+  inline void
   set(const uint8_t *keyDerBuf, size_t keyDerSize)
   {
     Buffer buf(keyDerBuf, keyDerSize);
@@ -59,6 +59,18 @@
   // Blob 
   // getDigest(DigestAlgorithm digestAlgorithm = DIGEST_ALGORITHM_SHA256) const;
 
+  inline bool
+  operator ==(const PublicKey &key) const
+  {
+    return key_ == key.key_;
+  }
+
+  inline bool
+  operator !=(const PublicKey &key) const
+  {
+    return key_ != key.key_;
+  }
+  
 private:
   Buffer key_;
 };
