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/src/certificate-request.hpp b/src/certificate-request.hpp
index 3ac9948..4c067c5 100644
--- a/src/certificate-request.hpp
+++ b/src/certificate-request.hpp
@@ -32,6 +32,12 @@
typedef boost::property_tree::ptree JsonSection;
+//Request Type Enum
+enum {
+ REQUEST_TYPE_NEW = 0,
+ REQUEST_TYPE_REVOKE = 1
+};
+
/**
* @brief Represents a certificate request instance.
*
@@ -43,8 +49,9 @@
{
public:
CertificateRequest();
- CertificateRequest(const Name& caName, const std::string& requestId, int status, const security::v2::Certificate& cert);
- CertificateRequest(const Name& caName, const std::string& requestId, int status,
+ CertificateRequest(const Name& caName, const std::string& requestId, int requestType, int status,
+ const security::v2::Certificate& cert);
+ CertificateRequest(const Name& caName, const std::string& requestId, int requestType, int status,
const std::string& challengeStatus, const std::string& challengeType,
const std::string& challengeTp, int remainingTime, int remainingTries,
const JsonSection& challengeSecrets, const security::v2::Certificate& cert);
@@ -55,6 +62,7 @@
public:
Name m_caPrefix;
std::string m_requestId = "";
+ int m_requestType = -1;
int m_status = -1;
security::v2::Certificate m_cert;
std::shared_ptr<Data> m_probeToken = nullptr;