Vince Lehman | b8b1806 | 2015-07-14 13:07:22 -0500 | [diff] [blame] | 1 | # -*- Mode:python; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | # |
Alexander Lane | 9944cf5 | 2018-05-17 12:16:50 -0500 | [diff] [blame] | 3 | # Copyright (C) 2015-2018, The University of Memphis, |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 4 | # Arizona Board of Regents, |
| 5 | # Regents of the University of California. |
Vince Lehman | b8b1806 | 2015-07-14 13:07:22 -0500 | [diff] [blame] | 6 | # |
| 7 | # This file is part of Mini-NDN. |
| 8 | # See AUTHORS.md for a complete list of Mini-NDN authors and contributors. |
| 9 | # |
| 10 | # Mini-NDN is free software: you can redistribute it and/or modify |
| 11 | # it under the terms of the GNU General Public License as published by |
| 12 | # the Free Software Foundation, either version 3 of the License, or |
| 13 | # (at your option) any later version. |
| 14 | # |
| 15 | # Mini-NDN is distributed in the hope that it will be useful, |
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 18 | # GNU General Public License for more details. |
| 19 | # |
| 20 | # You should have received a copy of the GNU General Public License |
| 21 | # along with Mini-NDN, e.g., in COPYING.md file. |
| 22 | # If not, see <http://www.gnu.org/licenses/>. |
| 23 | |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 24 | from mininet.clean import sh |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 25 | from mininet.examples.cluster import RemoteMixin |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 26 | from mininet.log import info |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 27 | |
Ashlesh Gawande | 792c6aa | 2015-07-10 12:18:36 -0500 | [diff] [blame] | 28 | from ndn.ndn_application import NdnApplication |
Alexander Lane | 4fa8881 | 2018-05-23 12:56:52 -0500 | [diff] [blame] | 29 | from ndn.util import ssh, scp, copyExistentFile |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 30 | from ndn.apps.nfdc import Nfdc |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 31 | |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 32 | import shutil |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 33 | import os |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 34 | import textwrap |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 35 | from subprocess import call |
Ashlesh Gawande | 59f8624 | 2017-05-05 09:45:18 -0500 | [diff] [blame] | 36 | import time |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 37 | |
Ashlesh Gawande | f6a610b | 2017-02-21 14:48:08 -0600 | [diff] [blame] | 38 | NETWORK="/ndn/" |
| 39 | |
Ashlesh Gawande | 792c6aa | 2015-07-10 12:18:36 -0500 | [diff] [blame] | 40 | class Nlsr(NdnApplication): |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 41 | def __init__(self, node, options): |
Ashlesh Gawande | 792c6aa | 2015-07-10 12:18:36 -0500 | [diff] [blame] | 42 | NdnApplication.__init__(self, node) |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 43 | self.config = NlsrConfigGenerator(node, options) |
| 44 | |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 45 | self.node = node |
Alexander Lane | 6f7a64f | 2018-05-17 15:01:14 -0500 | [diff] [blame] | 46 | self.routerName = "/{}C1.Router/cs/{}".format('%', node.name) |
| 47 | self.confFile = "{}/nlsr.conf".format(node.homeFolder) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 48 | |
| 49 | # Make directory for log file |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 50 | self.logDir = "{}/log".format(node.homeFolder) |
| 51 | self.node.cmd("mkdir {}".format(self.logDir)) |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 52 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 53 | def start(self, sleepTime = 1): |
| 54 | self.node.cmd("export NDN_LOG=nlsr.*={}".format(self.node.params["params"].get("nlsr-log-level", "DEBUG"))) |
dmcoomes | 73caa52 | 2018-01-15 16:33:32 -0600 | [diff] [blame] | 55 | NdnApplication.start(self, "nlsr -f {} > log/nlsr.log 2>&1 &".format(self.confFile)) |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 56 | time.sleep(sleepTime) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 57 | |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 58 | def createFaces(self): |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 59 | for ip in self.config.neighborIPs: |
| 60 | Nfdc.createFace(self.node, ip, self.config.faceType, isPermanent=True) |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 61 | |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 62 | @staticmethod |
| 63 | def createKey(host, name, outputFile): |
| 64 | host.cmd("ndnsec-keygen {} > {}".format(name, outputFile)) |
| 65 | |
| 66 | @staticmethod |
Ashlesh Gawande | a80484e | 2017-10-17 15:52:23 -0500 | [diff] [blame] | 67 | def createCertificate(host, signer, keyFile, outputFile): |
| 68 | host.cmd("ndnsec-certgen -s {} -r {} > {}".format(signer, keyFile, outputFile)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 69 | |
| 70 | @staticmethod |
| 71 | def createKeysAndCertificates(net, workDir): |
| 72 | securityDir = "{}/security".format(workDir) |
| 73 | |
| 74 | if not os.path.exists(securityDir): |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 75 | os.mkdir(securityDir) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 76 | |
| 77 | # Create root certificate |
Ashlesh Gawande | f6a610b | 2017-02-21 14:48:08 -0600 | [diff] [blame] | 78 | rootName = NETWORK |
Ashlesh Gawande | a80484e | 2017-10-17 15:52:23 -0500 | [diff] [blame] | 79 | sh("ndnsec-keygen {}".format(rootName)) # Installs a self-signed cert into the system |
Alexander Lane | 4fa8881 | 2018-05-23 12:56:52 -0500 | [diff] [blame] | 80 | sh("ndnsec-cert-dump -i {} > {}/root.cert".format(rootName, securityDir)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 81 | |
| 82 | # Create necessary certificates for each site |
| 83 | for host in net.hosts: |
| 84 | nodeSecurityFolder = "{}/security".format(host.homeFolder) |
| 85 | |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 86 | host.cmd("mkdir -p %s" % nodeSecurityFolder) |
| 87 | |
| 88 | # Create temp folders for remote nodes on this machine (localhost) to store site.key file |
| 89 | # from RemoteNodes |
| 90 | if not os.path.exists(nodeSecurityFolder) and isinstance(host, RemoteMixin) and host.isRemote: |
| 91 | os.makedirs(nodeSecurityFolder) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 92 | |
| 93 | shutil.copyfile("{}/root.cert".format(securityDir), "{}/root.cert".format(nodeSecurityFolder)) |
| 94 | |
| 95 | # Create site certificate |
Ashlesh Gawande | f6a610b | 2017-02-21 14:48:08 -0600 | [diff] [blame] | 96 | siteName = "{}{}-site".format(NETWORK, host.name) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 97 | siteKeyFile = "{}/site.keys".format(nodeSecurityFolder) |
| 98 | siteCertFile = "{}/site.cert".format(nodeSecurityFolder) |
| 99 | Nlsr.createKey(host, siteName, siteKeyFile) |
| 100 | |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 101 | # Copy siteKeyFile from remote for ndnsec-certgen |
| 102 | if isinstance(host, RemoteMixin) and host.isRemote: |
| 103 | login = "mininet@{}".format(host.server) |
| 104 | src = "{}:{}".format(login, siteKeyFile) |
| 105 | dst = siteKeyFile |
| 106 | scp(src, dst) |
| 107 | |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 108 | # Root key is in root namespace, must sign site key and then install on host |
Ashlesh Gawande | a80484e | 2017-10-17 15:52:23 -0500 | [diff] [blame] | 109 | sh("ndnsec-certgen -s {} -r {} > {}".format(rootName, siteKeyFile, siteCertFile)) |
Ashlesh Gawande | f5f304b | 2016-06-16 16:42:41 -0500 | [diff] [blame] | 110 | |
| 111 | # Copy root.cert and site.cert from localhost to remote host |
| 112 | if isinstance(host, RemoteMixin) and host.isRemote: |
| 113 | login = "mininet@{}".format(host.server) |
| 114 | src = "{}/site.cert".format(nodeSecurityFolder) |
| 115 | src2 = "{}/root.cert".format(nodeSecurityFolder) |
| 116 | dst = "{}:/tmp/".format(login) |
| 117 | scp(src, src2, dst) |
| 118 | host.cmd("mv /tmp/*.cert {}".format(nodeSecurityFolder)) |
| 119 | |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 120 | host.cmd("ndnsec-cert-install -f {}".format(siteCertFile)) |
| 121 | |
Ashlesh Gawande | 3bed483 | 2017-02-08 18:17:31 -0600 | [diff] [blame] | 122 | # Create and install operator certificate |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 123 | opName = "{}/%C1.Operator/op".format(siteName) |
| 124 | opKeyFile = "{}/op.keys".format(nodeSecurityFolder) |
| 125 | opCertFile = "{}/op.cert".format(nodeSecurityFolder) |
| 126 | Nlsr.createKey(host, opName, opKeyFile) |
Ashlesh Gawande | a80484e | 2017-10-17 15:52:23 -0500 | [diff] [blame] | 127 | Nlsr.createCertificate(host, siteName, opKeyFile, opCertFile) |
Ashlesh Gawande | 3bed483 | 2017-02-08 18:17:31 -0600 | [diff] [blame] | 128 | host.cmd("ndnsec-cert-install -f {}".format(opCertFile)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 129 | |
Ashlesh Gawande | 3bed483 | 2017-02-08 18:17:31 -0600 | [diff] [blame] | 130 | # Create and install router certificate |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 131 | routerName = "{}/%C1.Router/cs/{}".format(siteName, host.name) |
| 132 | routerKeyFile = "{}/router.keys".format(nodeSecurityFolder) |
| 133 | routerCertFile = "{}/router.cert".format(nodeSecurityFolder) |
| 134 | Nlsr.createKey(host, routerName, routerKeyFile) |
Ashlesh Gawande | a80484e | 2017-10-17 15:52:23 -0500 | [diff] [blame] | 135 | Nlsr.createCertificate(host, opName, routerKeyFile, routerCertFile) |
Ashlesh Gawande | 3bed483 | 2017-02-08 18:17:31 -0600 | [diff] [blame] | 136 | host.cmd("ndnsec-cert-install -f {}".format(routerCertFile)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 137 | |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 138 | class NlsrConfigGenerator: |
| 139 | |
| 140 | ROUTING_LINK_STATE = "ls" |
| 141 | ROUTING_HYPERBOLIC = "hr" |
| 142 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 143 | def __init__(self, node, options): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 144 | self.node = node |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 145 | self.isSecurityEnabled = options.nlsrSecurity |
| 146 | self.faceType = options.faceType |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 147 | self.infocmd = "infoedit -f nlsr.conf" |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 148 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 149 | parameters = node.params["params"] |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 150 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 151 | self.nFaces = options.nFaces |
| 152 | if options.routingType == "hr": |
| 153 | self.hyperbolicState = "on" |
| 154 | elif options.routingType == "dry": |
| 155 | self.hyperbolicState = "dry-run" |
| 156 | else: |
| 157 | self.hyperbolicState = "off" |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 158 | self.hyperRadius = parameters.get("radius", 0.0) |
| 159 | self.hyperAngle = parameters.get("angle", 0.0) |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 160 | |
| 161 | if ((self.hyperbolicState == "on" or self.hyperbolicState == "dry-run") and |
| 162 | (self.hyperRadius == 0.0 or self.hyperAngle == 0.0)): |
| 163 | info('Hyperbolic coordinates in topology file are either missing or misconfigured.') |
| 164 | info('Check that each node has one radius value and one or two angle value(s).') |
| 165 | sys.exit(1) |
| 166 | |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 167 | self.neighborIPs = [] |
Alexander Lane | 4fa8881 | 2018-05-23 12:56:52 -0500 | [diff] [blame] | 168 | possibleConfPaths = ["/usr/local/etc/ndn/nlsr.conf.sample", "/etc/ndn/nlsr.conf.sample"] |
| 169 | copyExistentFile(node, possibleConfPaths, "{}/nlsr.conf".format(self.node.homeFolder)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 170 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 171 | self.createConfigFile() |
| 172 | |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 173 | def createConfigFile(self): |
| 174 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 175 | self.__editGeneralSection() |
| 176 | self.__editNeighborsSection() |
| 177 | self.__editHyperbolicSection() |
| 178 | self.__editFibSection() |
| 179 | self.__editAdvertisingSection() |
| 180 | self.__editSecuritySection() |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 181 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 182 | def __editGeneralSection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 183 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 184 | self.node.cmd("{} -s general.network -v {}".format(self.infocmd, NETWORK)) |
| 185 | self.node.cmd("{} -s general.site -v /{}-site".format(self.infocmd, self.node.name)) |
| 186 | self.node.cmd("{} -s general.router -v /%C1.Router/cs/{}".format(self.infocmd, self.node.name)) |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 187 | self.node.cmd("{} -s general.log-dir -v {}/log".format(self.infocmd, self.node.homeFolder)) |
| 188 | self.node.cmd("{} -s general.seq-dir -v {}/log".format(self.infocmd, self.node.homeFolder)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 189 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 190 | def __editNeighborsSection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 191 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 192 | self.node.cmd("{} -d neighbors.neighbor".format(self.infocmd)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 193 | for intf in self.node.intfList(): |
| 194 | link = intf.link |
| 195 | if link: |
| 196 | node1, node2 = link.intf1.node, link.intf2.node |
| 197 | |
| 198 | if node1 == self.node: |
| 199 | other = node2 |
| 200 | ip = other.IP(str(link.intf2)) |
| 201 | else: |
| 202 | other = node1 |
| 203 | ip = other.IP(str(link.intf1)) |
| 204 | |
ashu | 7b6ba18 | 2015-04-17 15:02:37 -0500 | [diff] [blame] | 205 | linkCost = intf.params.get("delay", "10ms").replace("ms", "") |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 206 | |
Ashlesh Gawande | 27b5e1b | 2018-08-06 17:47:15 -0500 | [diff] [blame^] | 207 | Nfdc.createFace(self.node, ip, self.faceType, isPermanent=True) |
Ashlesh Gawande | 708fcca | 2017-06-23 14:04:12 -0500 | [diff] [blame] | 208 | self.neighborIPs.append(ip) |
| 209 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 210 | self.node.cmd("{} -a neighbors.neighbor \ |
Saurab Dulal | 5f8c796 | 2018-03-09 12:54:38 -0600 | [diff] [blame] | 211 | <<<\'name {}{}-site/%C1.Router/cs/{} face-uri {}://{}\n link-cost {}\'" |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 212 | .format(self.infocmd, NETWORK, other.name, other.name, self.faceType, ip, linkCost)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 213 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 214 | def __editHyperbolicSection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 215 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 216 | self.node.cmd("{} -s hyperbolic.state -v {}".format(self.infocmd, self.hyperbolicState)) |
| 217 | self.node.cmd("{} -s hyperbolic.radius -v {}".format(self.infocmd, self.hyperRadius)) |
| 218 | self.node.cmd("{} -s hyperbolic.angle -v {}".format(self.infocmd, self.hyperAngle)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 219 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 220 | def __editFibSection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 221 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 222 | self.node.cmd("{} -s fib.max-faces-per-prefix -v {}".format(self.infocmd, self.nFaces)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 223 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 224 | def __editAdvertisingSection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 225 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 226 | self.node.cmd("{} -d advertising.prefix".format(self.infocmd)) |
| 227 | self.node.cmd("{} -s advertising.prefix -v {}{}-site/{}" |
| 228 | .format(self.infocmd, NETWORK, self.node.name, self.node.name)) |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 229 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 230 | def __editSecuritySection(self): |
ashu | ef3490b | 2015-02-17 11:01:04 -0600 | [diff] [blame] | 231 | |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 232 | self.node.cmd("{} -d security.cert-to-publish".format(self.infocmd)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 233 | if self.isSecurityEnabled is False: |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 234 | self.node.cmd("{} -s security.validator.trust-anchor.type -v any".format(self.infocmd)) |
| 235 | self.node.cmd("{} -d security.validator.trust-anchor.file-name".format(self.infocmd)) |
| 236 | self.node.cmd("{} -s security.prefix-update-validator.trust-anchor.type -v any".format(self.infocmd)) |
| 237 | self.node.cmd("{} -d security.prefix-update-validator.trust-anchor.file-name".format(self.infocmd)) |
Vince Lehman | 5d5a566 | 2015-12-02 12:33:12 -0600 | [diff] [blame] | 238 | else: |
Saurab Dulal | 7a6978e | 2017-11-29 10:50:09 -0600 | [diff] [blame] | 239 | self.node.cmd("{} -s security.validator.trust-anchor.file-name -v security/root.cert".format(self.infocmd)) |
| 240 | self.node.cmd("{} -s security.prefix-update-validator.trust-anchor.file-name -v security/site.cert".format(self.infocmd)) |
| 241 | self.node.cmd("{} -p security.cert-to-publish -v security/site.cert".format(self.infocmd)) |
| 242 | self.node.cmd("{} -p security.cert-to-publish -v security/op.cert".format(self.infocmd)) |
dmcoomes | 73caa52 | 2018-01-15 16:33:32 -0600 | [diff] [blame] | 243 | self.node.cmd("{} -p security.cert-to-publish -v security/router.cert".format(self.infocmd)) |