23 #ifndef NDN_GROUP_MANAGER_HPP
24 #define NDN_GROUP_MANAGER_HPP
26 #include "../security/certificate/identity-certificate.hpp"
27 #include "group-manager-db.hpp"
30 class TestGroupManager_CreateDKeyData_Test;
31 class TestGroupManager_CreateEKeyData_Test;
32 class TestGroupManager_CalculateInterval_Test;
60 (
const Name& prefix,
const Name& dataType,
61 const ptr_lib::shared_ptr<GroupManagerDb>& database, uint32_t keySize,
62 int freshnessHours,
KeyChain* keyChain);
79 std::vector<ptr_lib::shared_ptr<Data> >& result);
91 database_->addSchedule(scheduleName, schedule);
103 database_->deleteSchedule(scheduleName);
117 database_->updateSchedule(scheduleName, schedule);
136 (scheduleName, cert.getPublicKeyName(), cert.getPublicKeyInfo().getKeyDer());
148 database_->deleteMember(identity);
161 database_->updateMemberSchedule(identity, scheduleName);
166 friend TestGroupManager_CreateDKeyData_Test;
167 friend TestGroupManager_CreateEKeyData_Test;
168 friend TestGroupManager_CalculateInterval_Test;
191 generateKeyPair(
Blob& privateKeyBlob,
Blob& publicKeyBlob);
201 ptr_lib::shared_ptr<Data>
203 (
const std::string& startTimeStamp,
const std::string& endTimeStamp,
204 const Blob& publicKeyBlob);
219 ptr_lib::shared_ptr<Data>
221 (
const std::string& startTimeStamp,
const std::string& endTimeStamp,
222 const Name& keyName,
const Blob& privateKeyBlob,
const Blob& certificateKey);
225 ptr_lib::shared_ptr<GroupManagerDb> database_;
229 static const uint64_t MILLISECONDS_IN_HOUR = 3600 * 1000;
A GroupManager manages keys and schedules for group members in a particular namespace.
Definition: group-manager.hpp:43
An Interval defines a time duration which contains a start timestamp and an end timestamp.
Definition: interval.hpp:36
void deleteSchedule(const std::string &scheduleName)
Delete the schedule with the given scheduleName.
Definition: group-manager.hpp:101
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
void updateMemberSchedule(const Name &identity, const std::string &scheduleName)
Change the name of the schedule for the given member's identity name.
Definition: group-manager.hpp:159
Schedule is used to manage the times when a member can access data using two sets of RepetitiveInterv...
Definition: schedule.hpp:43
void removeMember(const Name &identity)
Remove a member with the given identity name.
Definition: group-manager.hpp:146
Definition: identity-certificate.hpp:30
void addSchedule(const std::string &scheduleName, const Schedule &schedule)
Add a schedule with the given scheduleName.
Definition: group-manager.hpp:89
KeyChain is the main class of the security library.
Definition: key-chain.hpp:45
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
GroupManager(const Name &prefix, const Name &dataType, const ptr_lib::shared_ptr< GroupManagerDb > &database, uint32_t keySize, int freshnessHours, KeyChain *keyChain)
Create a group manager with the given values.
Definition: group-manager.cpp:34
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:117
void addMember(const std::string &scheduleName, const Data &memberCertificate)
Add a new member with the given memberCertificate into a schedule named scheduleName.
Definition: group-manager.hpp:132
void updateSchedule(const std::string &scheduleName, const Schedule &schedule)
Update the schedule with scheduleName and replace the old object with the given schedule.
Definition: group-manager.hpp:115
void getGroupKey(MillisecondsSince1970 timeSlot, std::vector< ptr_lib::shared_ptr< Data > > &result)
Create a group key for the interval into which timeSlot falls.
Definition: group-manager.cpp:48