blob: 2266a25d5119631b935b475429ceb0fa8d538771 [file] [log] [blame]
Zhiyi Zhang08e0e982017-03-01 10:10:42 -08001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
swa77020643ac2020-03-26 02:24:45 -07002/**
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -07003 * Copyright (c) 2017-2020, Regents of the University of California.
Zhiyi Zhang08e0e982017-03-01 10:10:42 -08004 *
5 * This file is part of ndncert, a certificate management system based on NDN.
6 *
7 * ndncert is free software: you can redistribute it and/or modify it under the terms
8 * of the GNU General Public License as published by the Free Software Foundation, either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * ndncert is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 * PARTICULAR PURPOSE. See the GNU General Public License for more details.
14 *
15 * You should have received copies of the GNU General Public License along with
16 * ndncert, e.g., in COPYING.md file. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * See AUTHORS.md for complete list of ndncert authors and contributors.
19 */
20
Zhiyi Zhangc87d52b2020-09-28 22:07:18 -070021#include "challenge-module.hpp"
22#include "client-module.hpp"
23#include "protocol-detail/info.hpp"
24#include <ndn-cxx/security/verification-helpers.hpp>
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -070025#include <boost/asio.hpp>
Davide Pesaventob48bbda2020-07-27 19:41:37 -040026#include <boost/program_options/options_description.hpp>
27#include <boost/program_options/parsers.hpp>
28#include <boost/program_options/variables_map.hpp>
Zhiyi Zhang48f23782020-09-28 12:11:24 -070029#include <iostream>
Zhiyi Zhang48f23782020-09-28 12:11:24 -070030#include <string>
31
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080032namespace ndn {
33namespace ndncert {
34
Zhiyi Zhang48f23782020-09-28 12:11:24 -070035static void
36startApplication();
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070037
Zhiyi Zhang1c0bd372017-12-18 18:32:55 +080038int nStep;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070039Face face;
tylerliu182bc532020-09-25 01:54:45 -070040security::v2::KeyChain keyChain;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070041std::string challengeType;
Zhiyi Zhang36706832019-07-04 21:33:03 -070042int validityPeriod = -1;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070043ClientModule client(keyChain);
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080044
Zhiyi Zhang46049832020-09-28 17:08:12 -070045static void
46captureParams(std::vector<std::tuple<std::string, std::string>>& requirement)
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080047{
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070048 std::list<std::string> results;
Zhiyi Zhang46049832020-09-28 17:08:12 -070049 for (auto& item : requirement) {
50 std::cerr << std::get<1>(item) << std::endl;
51 std::string captured;
52 getline(std::cin, captured);
53 std::get<1>(item) = captured;
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080054 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070055 std::cerr << "Got it. This is what you've provided:" << std::endl;
Zhiyi Zhang46049832020-09-28 17:08:12 -070056 for (const auto& item : requirement) {
57 std::cerr << std::get<0>(item) << " : " << std::get<1>(item) << std::endl;
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080058 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070059}
Zhiyi Zhang08e0e982017-03-01 10:10:42 -080060
Zhiyi Zhang547c8512019-06-18 23:46:14 -070061static std::list<std::string>
62captureParams(const std::vector<std::string>& requirement)
63{
64 std::list<std::string> results;
65 for (const auto& item : requirement) {
66 std::cerr << "Please provide the argument: " << item << " : " << std::endl;
67 std::string tempParam;
68 getline(std::cin, tempParam);
69 results.push_back(tempParam);
70 }
71 std::cerr << "Got it. This is what you've provided:" << std::endl;
72 auto it1 = results.begin();
73 auto it2 = requirement.begin();
74 for (; it1 != results.end() && it2 != requirement.end(); it1++, it2++) {
75 std::cerr << *it2 << " : " << *it1 << std::endl;
76 }
77 return results;
78}
79
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -070080static void
Zhiyi Zhang36706832019-07-04 21:33:03 -070081captureValidityPeriod()
82{
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -070083 if (validityPeriod > 0) {
84 return;
85 }
86 std::cerr << "Step " << nStep++
87 << ": Please type in your expected validity period of your certificate."
88 << " Type the number of hours (168 for week, 730 for month, 8760 for year)."
89 << " The CA may reject your application if your expected period is too long." << std::endl;
90 std::string periodStr = "";
91 getline(std::cin, periodStr);
92 try {
93 validityPeriod = std::stoi(periodStr);
94 }
95 catch (const std::exception& e) {
96 validityPeriod = -1;
Zhiyi Zhang36706832019-07-04 21:33:03 -070097 }
98}
99
100static void
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700101onNackCb()
102{
103 std::cerr << "Got NACK\n";
104}
105
106static void
107timeoutCb()
108{
109 std::cerr << "Interest sent time out\n";
110}
111
112static void
swa770cf1d8f72020-04-21 23:12:39 -0700113certFetchCb(const Data& reply)
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700114{
swa770cf1d8f72020-04-21 23:12:39 -0700115 client.onCertFetchResponse(reply);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700116 std::cerr << "Step " << nStep++
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700117 << ": DONE! Certificate has already been installed to local keychain\n"
Zhiyi Zhangef6b36a2020-09-22 21:20:59 -0700118 << "Certificate Name: " << reply.getName().toUri() << std::endl;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700119}
120
121static void
122challengeCb(const Data& reply)
123{
124 client.onChallengeResponse(reply);
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700125 if (client.getApplicationStatus() == Status::SUCCESS) {
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700126 std::cerr << "DONE! Certificate has already been issued \n";
swa770cf1d8f72020-04-21 23:12:39 -0700127 face.expressInterest(*client.generateCertFetchInterest(), bind(&certFetchCb, _2),
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700128 bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhang4d89fe02017-04-28 18:51:51 -0700129 return;
130 }
131
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700132 auto challenge = ChallengeModule::createChallengeModule(challengeType);
Zhiyi Zhang46049832020-09-28 17:08:12 -0700133 auto requirement = challenge->getRequestedParameterList(client.getApplicationStatus(),
134 client.getChallengeStatus());
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700135 if (requirement.size() > 0) {
Zhiyi Zhang916ba2d2018-02-01 18:16:27 -0800136 std::cerr << "Step " << nStep++ << ": Please satisfy following instruction(s)\n";
Zhiyi Zhang46049832020-09-28 17:08:12 -0700137 captureParams(requirement);
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800138 }
Suyong Won19fba4d2020-05-09 13:39:46 -0700139 face.expressInterest(*client.generateChallengeInterest(challenge->genChallengeRequestTLV(client.getApplicationStatus(),
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700140 client.getChallengeStatus(),
Zhiyi Zhang46049832020-09-28 17:08:12 -0700141 std::move(requirement))),
Zhiyi Zhang36706832019-07-04 21:33:03 -0700142 bind(&challengeCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700143}
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800144
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700145static void
146newCb(const Data& reply)
147{
Zhiyi Zhang36706832019-07-04 21:33:03 -0700148 int challengeIndex = 0;
tylerliu0e176c32020-09-29 11:39:46 -0700149 auto challengeList = client.onNewRenewRevokeResponse(reply);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700150 if (challengeList.size() < 1) {
151 std::cerr << "There is no available challenge provided by the CA. Exit" << std::endl;
152 return;
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800153 }
Zhiyi Zhang36706832019-07-04 21:33:03 -0700154 else if (challengeList.size() > 1) {
155 int count = 0;
156 std::string choice = "";
157 std::cerr << "Step " << nStep++ << ": Please type in the challenge index that you want to perform\n";
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700158 count = 0;
159 for (auto item : challengeList) {
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700160 std::cerr << "\t" << count++ << " : " << item << std::endl;
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700161 }
162 getline(std::cin, choice);
163 try {
164 challengeIndex = std::stoi(choice);
165 }
166 catch (const std::exception& e) {
167 challengeIndex = -1;
168 }
169 if (challengeIndex < 0 || challengeIndex >= count) {
170 std::cerr << "Your input index is out of range. Exit." << std::endl;
171 return;
172 }
Zhiyi Zhang36706832019-07-04 21:33:03 -0700173 }
174 auto it = challengeList.begin();
175 std::advance(it, challengeIndex);
176 unique_ptr<ChallengeModule> challenge = ChallengeModule::createChallengeModule(*it);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700177 if (challenge != nullptr) {
Zhiyi Zhang36706832019-07-04 21:33:03 -0700178 challengeType = *it;
179 std::cerr << "The challenge has been selected: " << challengeType << std::endl;
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800180 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700181 else {
Zhiyi Zhang36706832019-07-04 21:33:03 -0700182 std::cerr << "Error. Cannot load selected Challenge Module. Exit." << std::endl;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700183 return;
184 }
Zhiyi Zhang46049832020-09-28 17:08:12 -0700185 auto requirement = challenge->getRequestedParameterList(client.getApplicationStatus(),
186 client.getChallengeStatus());
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700187 if (requirement.size() > 0) {
Zhiyi Zhang46049832020-09-28 17:08:12 -0700188 std::cerr << "Step " << nStep++ << ": Please provide parameters used for Identity Verification Challenge\n";
189 captureParams(requirement);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700190 }
Suyong Won19fba4d2020-05-09 13:39:46 -0700191 face.expressInterest(*client.generateChallengeInterest(challenge->genChallengeRequestTLV(client.getApplicationStatus(),
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700192 client.getChallengeStatus(),
Zhiyi Zhang46049832020-09-28 17:08:12 -0700193 std::move(requirement))),
Zhiyi Zhang36706832019-07-04 21:33:03 -0700194 bind(&challengeCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700195}
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800196
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700197static void
Suyong Won19fba4d2020-05-09 13:39:46 -0700198InfoCb(const Data& reply)
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700199{
Suyong Won19fba4d2020-05-09 13:39:46 -0700200 const Block& contentBlock = reply.getContent();
201
202 if (!client.verifyInfoResponse(reply)) {
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700203 std::cerr << "The fetched CA information cannot be trusted because its integrity is broken" << std::endl;
204 return;
205 }
Suyong Won19fba4d2020-05-09 13:39:46 -0700206 auto caItem = INFO::decodeClientConfigFromContent(contentBlock);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700207
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700208 std::cerr << "Will use a new trust anchor, please double check the identity info: \n"
Zhiyi Zhangef6b36a2020-09-22 21:20:59 -0700209 << "This trust anchor information is signed by " << reply.getSignature().getKeyLocator()
Davide Pesaventob48bbda2020-07-27 19:41:37 -0400210 << std::endl
211 << "The certificate is " << caItem.m_anchor << std::endl
212 << "Do you trust the information? Type in YES or NO" << std::endl;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700213
214 std::string answer;
215 getline(std::cin, answer);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700216 boost::algorithm::to_lower(answer);
217 if (answer == "yes") {
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700218 std::cerr << "You answered YES: new CA will be used" << std::endl;
Suyong Won19fba4d2020-05-09 13:39:46 -0700219 client.addCaFromInfoResponse(reply);
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700220 // client.getClientConf().save(std::string(SYSCONFDIR) + "/ndncert/client.conf");
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700221 startApplication();
222 }
223 else {
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700224 std::cerr << "You answered NO: new CA will not be used" << std::endl;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700225 return;
226 }
227}
228
229static void
230probeCb(const Data& reply)
231{
Zhiyi Zhang781a5602019-06-26 19:05:04 -0700232 client.onProbeResponse(reply);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700233 captureValidityPeriod();
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700234 if (validityPeriod <= 0) {
235 std::cerr << "Invalid period time. Exit." << std::endl;
236 return;
237 }
Zhiyi Zhang781a5602019-06-26 19:05:04 -0700238 auto probeToken = make_shared<Data>(reply);
Zhiyi Zhang1a735bc2019-07-04 21:36:49 -0700239 auto now = time::system_clock::now();
Zhiyi Zhang36706832019-07-04 21:33:03 -0700240 std::cerr << "The validity period of your certificate will be: " << validityPeriod << " hours" << std::endl;
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700241 auto interest = client.generateNewInterest(now, now + time::hours(validityPeriod), Name(), probeToken);
242 if (interest != nullptr) {
243 face.expressInterest(*interest, bind(&newCb, _2), bind(&onNackCb), bind(&timeoutCb));
244 }
245 else {
246 std::cerr << "Cannot generate the Interest for NEW step. Exit" << std::endl;
247 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700248}
249
250static void
251startApplication()
252{
253 nStep = 0;
254 auto caList = client.getClientConf().m_caItems;
255 int count = 0;
256 for (auto item : caList) {
257 std::cerr << "***************************************\n"
258 << "Index: " << count++ << "\n"
Suyong Won256c9062020-05-11 02:45:56 -0700259 << "CA prefix:" << item.m_caPrefix << "\n"
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700260 << "Introduction: " << item.m_caInfo << "\n"
261 << "***************************************\n";
262 }
263 std::vector<ClientCaItem> caVector{std::begin(caList), std::end(caList)};
264 std::cerr << "Step "
265 << nStep++ << ": Please type in the CA INDEX that you want to apply"
266 << " or type in NONE if your expected CA is not in the list\n";
267
Zhiyi Zhang36706832019-07-04 21:33:03 -0700268 std::string caIndexS, caIndexSLower;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700269 getline(std::cin, caIndexS);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700270 caIndexSLower = caIndexS;
271 boost::algorithm::to_lower(caIndexSLower);
272 if (caIndexSLower == "none") {
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700273 std::cerr << "Step " << nStep << ": Please type in the CA Name\n";
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700274 std::string expectedCAName;
275 getline(std::cin, expectedCAName);
swa77020643ac2020-03-26 02:24:45 -0700276 face.expressInterest(*client.generateInfoInterest(Name(expectedCAName)),
Suyong Won19fba4d2020-05-09 13:39:46 -0700277 bind(&InfoCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700278 }
279 else {
Zhiyi Zhang36706832019-07-04 21:33:03 -0700280 int caIndex;
281 try {
282 caIndex = std::stoi(caIndexS);
283 }
284 catch (const std::exception& e) {
285 std::cerr << "Your input is neither NONE nor a valid index. Exit" << std::endl;
286 return;
287 }
288 if (caIndex < 0 || caIndex >= count) {
289 std::cerr << "Your input is not an existing index. Exit" << std::endl;
290 return;
291 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700292 auto targetCaItem = caVector[caIndex];
293
294 if (targetCaItem.m_probe != "") {
Zhiyi Zhang547c8512019-06-18 23:46:14 -0700295 std::cerr << "Step " << nStep++ << ": Please provide information for name assignment" << std::endl;
296 std::vector<std::string> probeFields = ClientModule::parseProbeComponents(targetCaItem.m_probe);
297 std::string redo = "";
298 std::list<std::string> capturedParams;
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700299 capturedParams = captureParams(probeFields);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700300 std::string probeInfo;
Zhiyi Zhang547c8512019-06-18 23:46:14 -0700301 for (const auto& item : capturedParams) {
302 probeInfo += item;
303 probeInfo += ":";
304 }
305 probeInfo = probeInfo.substr(0, probeInfo.size() - 1);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700306 face.expressInterest(*client.generateProbeInterest(targetCaItem, probeInfo),
Zhiyi Zhang36706832019-07-04 21:33:03 -0700307 bind(&probeCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700308 }
309 else {
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700310 std::cerr << "Step " << nStep++ << ": Please type in the full identity name you want to get (with CA prefix)\n";
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700311 std::string identityNameStr;
312 getline(std::cin, identityNameStr);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700313 captureValidityPeriod();
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700314 if (validityPeriod <= 0) {
315 std::cerr << "Invalid period time. Exit." << std::endl;
316 return;
317 }
318 Name idName(identityNameStr);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700319 std::cerr << "The validity period of your certificate will be: " << validityPeriod << " hours" << std::endl;
Zhiyi Zhang1a735bc2019-07-04 21:36:49 -0700320 auto now = time::system_clock::now();
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700321 auto interest = client.generateNewInterest(now, now + time::hours(validityPeriod), idName);
322 if (interest != nullptr) {
323 face.expressInterest(*interest, bind(&newCb, _2), bind(&onNackCb), bind(&timeoutCb));
324 }
325 else {
326 std::cerr << "Cannot generate the Interest for NEW step. Exit" << std::endl;
327 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700328 }
329 }
330}
331
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700332static void
333handleSignal(const boost::system::error_code& error, int signalNum)
334{
335 if (error) {
336 return;
337 }
338 const char* signalName = ::strsignal(signalNum);
339 std::cerr << "Exiting on signal ";
340 if (signalName == nullptr) {
341 std::cerr << signalNum;
342 }
343 else {
344 std::cerr << signalName;
345 }
346 std::cerr << std::endl;
347 client.endSession();
348 face.getIoService().stop();
349}
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800350
351int
352main(int argc, char* argv[])
353{
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700354 boost::asio::signal_set terminateSignals(face.getIoService());
355 terminateSignals.add(SIGINT);
356 terminateSignals.add(SIGTERM);
357 terminateSignals.async_wait(handleSignal);
358
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800359 namespace po = boost::program_options;
360 std::string configFilePath = std::string(SYSCONFDIR) + "/ndncert/client.conf";
Zhiyi Zhang36706832019-07-04 21:33:03 -0700361 po::options_description description("General Usage\n ndncert-client [-h] [-c] [-v]\n");
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700362 description.add_options()("help,h", "produce help message")("config-file,c", po::value<std::string>(&configFilePath), "configuration file name")("validity-period,v", po::value<int>(&validityPeriod)->default_value(-1),
363 "desired validity period (hours) of the certificate being requested");
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800364 po::positional_options_description p;
365
366 po::variables_map vm;
367 try {
368 po::store(po::command_line_parser(argc, argv).options(description).positional(p).run(), vm);
369 po::notify(vm);
370 }
371 catch (const std::exception& e) {
372 std::cerr << "ERROR: " << e.what() << std::endl;
373 return 1;
374 }
375 if (vm.count("help") != 0) {
376 std::cerr << description << std::endl;
377 return 0;
378 }
Zhiyi Zhangd8993b92019-07-04 21:58:10 -0700379 try {
380 client.getClientConf().load(configFilePath);
381 }
382 catch (const std::exception& e) {
383 std::cerr << "Cannot load the configuration file: " << e.what() << std::endl;
384 return 1;
385 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700386 startApplication();
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800387 face.processEvents();
388 return 0;
389}
390
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700391} // namespace ndncert
392} // namespace ndn
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800393
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700394int
395main(int argc, char* argv[])
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800396{
397 return ndn::ndncert::main(argc, argv);
398}