23 #ifndef NDN_IDENTITY_MANAGEMENT_FIXTURE_HPP
24 #define NDN_IDENTITY_MANAGEMENT_FIXTURE_HPP
27 #include <ndn-cpp/security/key-chain.hpp>
33 : keyChain_(
"pib-memory:",
"tpm-memory:")
40 saveCertificateToFile(
const ndn::Data& data,
const std::string& filePath);
49 ndn::ptr_lib::shared_ptr<ndn::PibIdentity>
52 const ndn::KeyParams& params = ndn::KeyChain::getDefaultKeyParams());
74 ndn::ptr_lib::shared_ptr<ndn::PibIdentity>
77 const ndn::ptr_lib::shared_ptr<ndn::PibIdentity>& issuer,
78 const ndn::KeyParams& params = ndn::KeyChain::getDefaultKeyParams());
86 ndn::ptr_lib::shared_ptr<ndn::CertificateV2>
88 (ndn::ptr_lib::shared_ptr<ndn::PibKey>& key,
const std::string& issuerId);
93 std::set<ndn::Name> identityNames_;
94 std::set<std::string> certificateFiles_;
Copyright (C) 2017-2018 Regents of the University of California.
Definition: identity-management-fixture.hpp:29
ndn::ptr_lib::shared_ptr< ndn::PibIdentity > addSubCertificate(const ndn::Name &subIdentityName, const ndn::ptr_lib::shared_ptr< ndn::PibIdentity > &issuer, const ndn::KeyParams ¶ms=ndn::KeyChain::getDefaultKeyParams())
Issue a certificate for subIdentityName signed by issuer.
Definition: identity-management-fixture.cpp:84
KeyChain is the main class of the security library.
Definition: key-chain.hpp:53
PibIdentity is at the top level in PIB's Identity-Key-Certificate hierarchy.
Definition: pib-identity.hpp:48
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
ndn::ptr_lib::shared_ptr< ndn::CertificateV2 > addCertificate(ndn::ptr_lib::shared_ptr< ndn::PibKey > &key, const std::string &issuerId)
Add a self-signed certificate made from the key and issuer ID.
Definition: identity-management-fixture.cpp:112
KeyParams is a base class for key parameters.
Definition: key-params.hpp:36
bool saveCertificate(ndn::PibIdentity identity, const std::string &filePath)
Save the identity's certificate to a file.
Definition: identity-management-fixture.cpp:70
ndn::ptr_lib::shared_ptr< ndn::PibIdentity > addIdentity(const ndn::Name &identityName, const ndn::KeyParams ¶ms=ndn::KeyChain::getDefaultKeyParams())
Add an identity for the identityName.
Definition: identity-management-fixture.cpp:60