blob: fb4efaa9bd5cb25a692019bcad88ccb483345c39 [file] [log] [blame]
akmhoque66e66182014-02-21 17:56:03 -06001#include <ndn-cpp-dev/security/identity-certificate.hpp>
2#include <ndn-cpp-dev/encoding/block.hpp>
3#include "nlsr_km.hpp"
4
5namespace nlsr
6{
7 void
8 KeyManager::initKeyManager(ConfParameter &cp)
9 {
10 ndn::Name identityName(cp.getRouterPrefix()+"/nlsr");
11 kChain.deleteIdentity(identityName);
12 ndn::Name certName = kChain.createIdentity(identityName);
13 cout<<"Certificate Name: "<<certName.toUri()<<endl;
14 ndn::Name keyName=
15 ndn::IdentityCertificate::certificateNameToPublicKeyName(certName);
16 cout<<"Key Name: "<<keyName.toUri()<<endl;
17 }
18
19}
20
21
22