Certificate revocation
Adds the handling of certificate revocation according to ndncert protocol v0.2.
Includes handing on CA module, client module as well as the test cases for these funcationalities.
Currently no internal database are being updated from the revocation.
This actual update and propagation of revocation information needs to relies on a certificate log, which can be attached to the CA module using status update callback.
Change-Id: I21f912285161ce781e17d222e640c8f0c57b50f7
diff --git a/tools/ndncert-ca-server.cpp b/tools/ndncert-ca-server.cpp
index 8aaf59b..10d6a6f 100644
--- a/tools/ndncert-ca-server.cpp
+++ b/tools/ndncert-ca-server.cpp
@@ -83,7 +83,7 @@
if (wantRepoOut) {
ca.setStatusUpdateCallback([&] (const CertificateRequest& request) {
- if (request.m_status == STATUS_SUCCESS) {
+ if (request.m_status == STATUS_SUCCESS && request.m_requestType == REQUEST_TYPE_NEW) {
auto issuedCert = request.m_cert;
boost::asio::ip::tcp::iostream requestStream;
#if BOOST_VERSION >= 106700
diff --git a/tools/ndncert-ca-status.cpp b/tools/ndncert-ca-status.cpp
index 7438dc6..ecfc9c6 100644
--- a/tools/ndncert-ca-status.cpp
+++ b/tools/ndncert-ca-status.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2017-2019, Regents of the University of California.
+ * Copyright (c) 2017-2020, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -76,6 +76,7 @@
for (const auto& entry : requestList) {
std::cerr << "Request ID: " << entry.m_requestId << "\t"
+ << "Request Type" << entry.m_requestType << "\t"
<< "Current Status: " << entry.m_status << std::endl
<< "Applying CA: " << entry.m_caPrefix << std::endl
<< "Applying for key: " << entry.m_cert.getName() << std::endl
diff --git a/tools/ndncert-client.cpp b/tools/ndncert-client.cpp
index f7bd7b0..0073521 100644
--- a/tools/ndncert-client.cpp
+++ b/tools/ndncert-client.cpp
@@ -38,7 +38,7 @@
int nStep;
Face face;
-security::KeyChain keyChain;
+security::v2::KeyChain keyChain;
std::string challengeType;
int validityPeriod = -1;
ClientModule client(keyChain);