Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an in-memory key chain in ndvr simulation environment #6

Open
italovalcy opened this issue Jul 6, 2021 · 0 comments
Open

Create an in-memory key chain in ndvr simulation environment #6

italovalcy opened this issue Jul 6, 2021 · 0 comments

Comments

@italovalcy
Copy link
Owner

Currently, the key chain is created in the default PIB/TPM ($HOME/.ndn/{ndnsec-key-file/,pib.db} and the router key/identity/certificate are created in the scenario context (not in the router context). As a consequence, we cannot run parallel simulations (due to file lock on $HOME/.ndn/pib.db) and also the n-th router knows about the identities of the (n-1)-th and not the opposite, which leads to inconsistency in Pib:

../src/ndnSIM/ndn-cxx/ndn-cxx/security/pib/pib.cpp:102: ndn::security::pib::Identity ndn::security::pib::Pib::getIdentity(const ndn::Name&) const: Assertion `m_identities.isConsistent()' failed.

NDVR should be able to run an in-memory router's KeyChain:

diff --git a/extensions/ndvr.cpp b/extensions/ndvr.cpp
index 0e01070..fede029 100644
--- a/extensions/ndvr.cpp
+++ b/extensions/ndvr.cpp
@@ -31,6 +31,7 @@ Ndvr::Ndvr(const ndn::security::SigningInfo& signingInfo, Name network, Name rou
   , m_rand(ns3::CreateObject<ns3::UniformRandomVariable>())
   , m_network(network)
   , m_routerName(routerName)
+  , m_keyChain("pib-memory:", "tpm-memory:", true)
   , m_helloIntervalIni(1)
   , m_helloIntervalCur(1)
   , m_helloIntervalMax(5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant