blob: 73ae8c300715bcd0bc50151d8d8efdcfe7fcb091 [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 Zhang1a735bc2019-07-04 21:36:49 -0700238 auto now = time::system_clock::now();
Zhiyi Zhang36706832019-07-04 21:33:03 -0700239 std::cerr << "The validity period of your certificate will be: " << validityPeriod << " hours" << std::endl;
Zhiyi Zhangb8bbc642020-09-29 14:08:26 -0700240 auto interest = client.generateNewInterest(now, now + time::hours(validityPeriod), Name());
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700241 if (interest != nullptr) {
242 face.expressInterest(*interest, bind(&newCb, _2), bind(&onNackCb), bind(&timeoutCb));
243 }
244 else {
245 std::cerr << "Cannot generate the Interest for NEW step. Exit" << std::endl;
246 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700247}
248
249static void
250startApplication()
251{
252 nStep = 0;
253 auto caList = client.getClientConf().m_caItems;
254 int count = 0;
255 for (auto item : caList) {
256 std::cerr << "***************************************\n"
257 << "Index: " << count++ << "\n"
Suyong Won256c9062020-05-11 02:45:56 -0700258 << "CA prefix:" << item.m_caPrefix << "\n"
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700259 << "Introduction: " << item.m_caInfo << "\n"
260 << "***************************************\n";
261 }
262 std::vector<ClientCaItem> caVector{std::begin(caList), std::end(caList)};
263 std::cerr << "Step "
264 << nStep++ << ": Please type in the CA INDEX that you want to apply"
265 << " or type in NONE if your expected CA is not in the list\n";
266
Zhiyi Zhang36706832019-07-04 21:33:03 -0700267 std::string caIndexS, caIndexSLower;
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700268 getline(std::cin, caIndexS);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700269 caIndexSLower = caIndexS;
270 boost::algorithm::to_lower(caIndexSLower);
271 if (caIndexSLower == "none") {
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700272 std::cerr << "Step " << nStep << ": Please type in the CA Name\n";
Zhiyi Zhangcaab5462019-10-18 13:41:02 -0700273 std::string expectedCAName;
274 getline(std::cin, expectedCAName);
swa77020643ac2020-03-26 02:24:45 -0700275 face.expressInterest(*client.generateInfoInterest(Name(expectedCAName)),
Suyong Won19fba4d2020-05-09 13:39:46 -0700276 bind(&InfoCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700277 }
278 else {
Zhiyi Zhang36706832019-07-04 21:33:03 -0700279 int caIndex;
280 try {
281 caIndex = std::stoi(caIndexS);
282 }
283 catch (const std::exception& e) {
284 std::cerr << "Your input is neither NONE nor a valid index. Exit" << std::endl;
285 return;
286 }
287 if (caIndex < 0 || caIndex >= count) {
288 std::cerr << "Your input is not an existing index. Exit" << std::endl;
289 return;
290 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700291 auto targetCaItem = caVector[caIndex];
292
293 if (targetCaItem.m_probe != "") {
Zhiyi Zhang547c8512019-06-18 23:46:14 -0700294 std::cerr << "Step " << nStep++ << ": Please provide information for name assignment" << std::endl;
295 std::vector<std::string> probeFields = ClientModule::parseProbeComponents(targetCaItem.m_probe);
296 std::string redo = "";
297 std::list<std::string> capturedParams;
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700298 capturedParams = captureParams(probeFields);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700299 std::string probeInfo;
Zhiyi Zhang547c8512019-06-18 23:46:14 -0700300 for (const auto& item : capturedParams) {
301 probeInfo += item;
302 probeInfo += ":";
303 }
304 probeInfo = probeInfo.substr(0, probeInfo.size() - 1);
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700305 face.expressInterest(*client.generateProbeInterest(targetCaItem, probeInfo),
Zhiyi Zhang36706832019-07-04 21:33:03 -0700306 bind(&probeCb, _2), bind(&onNackCb), bind(&timeoutCb));
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700307 }
308 else {
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700309 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 -0700310 std::string identityNameStr;
311 getline(std::cin, identityNameStr);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700312 captureValidityPeriod();
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700313 if (validityPeriod <= 0) {
314 std::cerr << "Invalid period time. Exit." << std::endl;
315 return;
316 }
317 Name idName(identityNameStr);
Zhiyi Zhang36706832019-07-04 21:33:03 -0700318 std::cerr << "The validity period of your certificate will be: " << validityPeriod << " hours" << std::endl;
Zhiyi Zhang1a735bc2019-07-04 21:36:49 -0700319 auto now = time::system_clock::now();
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700320 auto interest = client.generateNewInterest(now, now + time::hours(validityPeriod), idName);
321 if (interest != nullptr) {
322 face.expressInterest(*interest, bind(&newCb, _2), bind(&onNackCb), bind(&timeoutCb));
323 }
324 else {
325 std::cerr << "Cannot generate the Interest for NEW step. Exit" << std::endl;
326 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700327 }
328 }
329}
330
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700331static void
332handleSignal(const boost::system::error_code& error, int signalNum)
333{
334 if (error) {
335 return;
336 }
337 const char* signalName = ::strsignal(signalNum);
338 std::cerr << "Exiting on signal ";
339 if (signalName == nullptr) {
340 std::cerr << signalNum;
341 }
342 else {
343 std::cerr << signalName;
344 }
345 std::cerr << std::endl;
346 client.endSession();
347 face.getIoService().stop();
348}
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800349
350int
351main(int argc, char* argv[])
352{
Zhiyi Zhangad9e04f2020-03-27 12:04:31 -0700353 boost::asio::signal_set terminateSignals(face.getIoService());
354 terminateSignals.add(SIGINT);
355 terminateSignals.add(SIGTERM);
356 terminateSignals.async_wait(handleSignal);
357
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800358 namespace po = boost::program_options;
359 std::string configFilePath = std::string(SYSCONFDIR) + "/ndncert/client.conf";
Zhiyi Zhang36706832019-07-04 21:33:03 -0700360 po::options_description description("General Usage\n ndncert-client [-h] [-c] [-v]\n");
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700361 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),
362 "desired validity period (hours) of the certificate being requested");
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800363 po::positional_options_description p;
364
365 po::variables_map vm;
366 try {
367 po::store(po::command_line_parser(argc, argv).options(description).positional(p).run(), vm);
368 po::notify(vm);
369 }
370 catch (const std::exception& e) {
371 std::cerr << "ERROR: " << e.what() << std::endl;
372 return 1;
373 }
374 if (vm.count("help") != 0) {
375 std::cerr << description << std::endl;
376 return 0;
377 }
Zhiyi Zhangd8993b92019-07-04 21:58:10 -0700378 try {
379 client.getClientConf().load(configFilePath);
380 }
381 catch (const std::exception& e) {
382 std::cerr << "Cannot load the configuration file: " << e.what() << std::endl;
383 return 1;
384 }
Zhiyi Zhangaf7c2902019-03-14 22:13:21 -0700385 startApplication();
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800386 face.processEvents();
387 return 0;
388}
389
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700390} // namespace ndncert
391} // namespace ndn
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800392
Zhiyi Zhang48f23782020-09-28 12:11:24 -0700393int
394main(int argc, char* argv[])
Zhiyi Zhang08e0e982017-03-01 10:10:42 -0800395{
396 return ndn::ndncert::main(argc, argv);
397}