security: In IdentityCertificate, added publicKeyName_ and make getPublicKeyName just return it. Internally call setPublicKeyName as needed to set it. Make isCorrectName() check for "KEY".
diff --git a/include/ndn-cpp/security/certificate/identity-certificate.hpp b/include/ndn-cpp/security/certificate/identity-certificate.hpp
index 0319774..d111acc 100644
--- a/include/ndn-cpp/security/certificate/identity-certificate.hpp
+++ b/include/ndn-cpp/security/certificate/identity-certificate.hpp
@@ -43,8 +43,8 @@
virtual Data &
setName(const Name& name);
- virtual Name
- getPublicKeyName() const;
+ Name
+ getPublicKeyName () const { return publicKeyName_; }
static bool
isIdentityCertificate(const Certificate& certificate);
@@ -52,6 +52,12 @@
private:
static bool
isCorrectName(const Name& name);
+
+ void
+ setPublicKeyName();
+
+protected:
+ Name publicKeyName_;
};
}