security: Introduce hierarchical validator
Change-Id: Ie99abc2b8de4ff227c21e34fef19544c01a9f5dd
diff --git a/src/chat-dialog-backend.hpp b/src/chat-dialog-backend.hpp
index 051a35e..f01c015 100644
--- a/src/chat-dialog-backend.hpp
+++ b/src/chat-dialog-backend.hpp
@@ -46,6 +46,7 @@
const Name& routingPrefix,
const std::string& chatroomName,
const std::string& nick,
+ const Name& signingId = Name(),
QObject* parent = 0);
~ChatDialogBackend();
@@ -58,6 +59,9 @@
void
initializeSync();
+ shared_ptr<ndn::IdentityCertificate>
+ loadTrustAnchor();
+
void
close();
@@ -65,7 +69,9 @@
processSyncUpdate(const std::vector<chronosync::MissingDataInfo>& updates);
void
- processChatData(const ndn::shared_ptr<const ndn::Data>& data, bool needDisplay);
+ processChatData(const ndn::shared_ptr<const ndn::Data>& data,
+ bool needDisplay,
+ bool isValidated);
void
remoteSessionTimeout(const Name& sessionPrefix);
@@ -132,7 +138,7 @@
private:
typedef std::map<ndn::Name, UserInfo> BackendRoster;
- unique_ptr<ndn::Face> m_face;
+ shared_ptr<ndn::Face> m_face;
Name m_localRoutingPrefix; // routable local prefix
Name m_chatroomPrefix; // chatroom sync prefix
@@ -142,6 +148,8 @@
std::string m_chatroomName; // chatroom name
std::string m_nick; // user nick
+ Name m_signingId; // signing identity
+ shared_ptr<ndn::Validator> m_validator;// validator
shared_ptr<chronosync::Socket> m_sock; // SyncSocket
unique_ptr<ndn::Scheduler> m_scheduler;// scheduler