From 9665f5c9c1dd6f55f9c456c51e68959f9a33d5af Mon Sep 17 00:00:00 2001 From: suraviregmi Date: Thu, 9 Nov 2023 20:05:26 +0000 Subject: [PATCH] update ndnsec commands Change-Id: Ib802fd40d53e0405b9707e76dec4f2a92f9affc5 --- minindn/apps/nfd.py | 2 +- minindn/apps/nlsr.py | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/minindn/apps/nfd.py b/minindn/apps/nfd.py index 90a36b8..4b410b9 100644 --- a/minindn/apps/nfd.py +++ b/minindn/apps/nfd.py @@ -68,7 +68,7 @@ class Nfd(Application): if not Minindn.ndnSecurityDisabled: # Generate key and install cert for /localhost/operator to be used by NFD - node.cmd('ndnsec-keygen /localhost/operator | ndnsec-install-cert -') + node.cmd('ndnsec-key-gen /localhost/operator | ndnsec-cert-install -') def start(self): Application.start(self, 'nfd --config {}'.format(self.confFile), logfile=self.logFile) diff --git a/minindn/apps/nlsr.py b/minindn/apps/nlsr.py index c6a2c53..12a12d7 100644 --- a/minindn/apps/nlsr.py +++ b/minindn/apps/nlsr.py @@ -112,11 +112,11 @@ class Nlsr(Application): @staticmethod def createKey(host, name, outputFile): - host.cmd('ndnsec-keygen {} > {}'.format(name, outputFile)) + host.cmd('ndnsec-key-gen {} > {}'.format(name, outputFile)) @staticmethod def createCertificate(host, signer, keyFile, outputFile): - host.cmd('ndnsec-certgen -s {} -r {} > {}'.format(signer, keyFile, outputFile)) + host.cmd('ndnsec-cert-gen -s {} -r {} > {}'.format(signer, keyFile, outputFile)) def createKeysAndCertificates(self): securityDir = '{}/security'.format(Minindn.workDir) @@ -128,7 +128,7 @@ class Nlsr(Application): rootCertFile = '{}/root.cert'.format(securityDir) if not os.path.isfile(rootCertFile): # Create root certificate - sh('ndnsec-keygen {}'.format(rootName)) # Installs a self-signed cert into the system + sh('ndnsec-key-gen {}'.format(rootName)) # Installs a self-signed cert into the system sh('ndnsec-cert-dump -i {} > {}'.format(rootName, rootCertFile)) # Create necessary certificates for each site @@ -151,7 +151,7 @@ class Nlsr(Application): siteCertFile = '{}/site.cert'.format(nodeSecurityFolder) Nlsr.createKey(self.node, siteName, siteKeyFile) - # Copy siteKeyFile from remote for ndnsec-certgen + # Copy siteKeyFile from remote for ndnsec-cert-gen if isinstance(self.node, RemoteMixin) and self.node.isRemote: login = 'mininet@{}'.format(self.node.server) src = '{}:{}'.format(login, siteKeyFile) @@ -159,7 +159,7 @@ class Nlsr(Application): scp(src, dst) # Root key is in root namespace, must sign site key and then install on host - sh('ndnsec-certgen -s {} -r {} > {}'.format(rootName, siteKeyFile, siteCertFile)) + sh('ndnsec-cert-gen -s {} -r {} > {}'.format(rootName, siteKeyFile, siteCertFile)) # Copy root.cert and site.cert from localhost to remote host if isinstance(self.node, RemoteMixin) and self.node.isRemote: