diff --git a/src/ca-config.hpp b/src/ca-config.hpp
index fbdfb24..bba5af4 100644
--- a/src/ca-config.hpp
+++ b/src/ca-config.hpp
@@ -21,9 +21,7 @@
 #ifndef NDNCERT_CA_CONFIG_HPP
 #define NDNCERT_CA_CONFIG_HPP
 
-#include <ndn-cxx/security/v2/certificate.hpp>
-
-#include "certificate-request.hpp"
+#include "request-state.hpp"
 #include "client-config.hpp"
 
 namespace ndn {
@@ -46,9 +44,9 @@
  * fired whenever a request instance is created, challenge status is updated, and when certificate
  * is issued.
  *
- * @p CertificateRequest, input, the state of the certificate request whose status is updated.
+ * @p RequestState, input, the state of the certificate request whose status is updated.
  */
-using StatusUpdateCallback = function<void(const CertificateRequest&)>;
+using StatusUpdateCallback = function<void(const RequestState&)>;
 
 /**
  * @brief CA's configuration on NDNCERT.
diff --git a/src/ca-detail/ca-memory.cpp b/src/ca-detail/ca-memory.cpp
index 437afa4..a81f4bf 100644
--- a/src/ca-detail/ca-memory.cpp
+++ b/src/ca-detail/ca-memory.cpp
@@ -30,7 +30,7 @@
 
 NDNCERT_REGISTER_CA_STORAGE(CaMemory);
 
-CertificateRequest
+RequestState
 CaMemory::getRequest(const std::string& requestId)
 {
   auto search = m_requests.find(requestId);
@@ -41,7 +41,7 @@
 }
 
 void
-CaMemory::addRequest(const CertificateRequest& request)
+CaMemory::addRequest(const RequestState& request)
 {
   for (auto& entry : m_requests) {
     const auto& existingRequest = entry.second;
@@ -68,7 +68,7 @@
 }
 
 void
-CaMemory::updateRequest(const CertificateRequest& request)
+CaMemory::updateRequest(const RequestState& request)
 {
   m_requests[request.m_requestId] = request;
 }
@@ -82,20 +82,20 @@
   }
 }
 
-std::list<CertificateRequest>
+std::list<RequestState>
 CaMemory::listAllRequests()
 {
-  std::list<CertificateRequest> result;
+  std::list<RequestState> result;
   for (const auto& entry : m_requests) {
     result.push_back(entry.second);
   }
   return result;
 }
 
-std::list<CertificateRequest>
+std::list<RequestState>
 CaMemory::listAllRequests(const Name& caName)
 {
-  std::list<CertificateRequest> result;
+  std::list<RequestState> result;
   for (const auto& entry : m_requests) {
     if (entry.second.m_caPrefix == caName) {
       result.push_back(entry.second);
diff --git a/src/ca-detail/ca-memory.hpp b/src/ca-detail/ca-memory.hpp
index 859c726..19e7d4f 100644
--- a/src/ca-detail/ca-memory.hpp
+++ b/src/ca-detail/ca-memory.hpp
@@ -33,22 +33,22 @@
 
 public:
   // certificate request related
-  CertificateRequest
+  RequestState
   getRequest(const std::string& requestId) override;
 
   void
-  addRequest(const CertificateRequest& request) override;
+  addRequest(const RequestState& request) override;
 
   void
-  updateRequest(const CertificateRequest& request) override;
+  updateRequest(const RequestState& request) override;
 
   void
   deleteRequest(const std::string& requestId) override;
 
-  std::list<CertificateRequest>
+  std::list<RequestState>
   listAllRequests() override;
 
-  std::list<CertificateRequest>
+  std::list<RequestState>
   listAllRequests(const Name& caName) override;
 
   // certificate related
@@ -71,7 +71,7 @@
   listAllIssuedCertificates(const Name& caName) override;
 
 private:
-  std::map<std::string, CertificateRequest> m_requests;
+  std::map<std::string, RequestState> m_requests;
   std::map<std::string, security::v2::Certificate> m_issuedCerts;
 };
 
diff --git a/src/ca-detail/ca-sqlite.cpp b/src/ca-detail/ca-sqlite.cpp
index a73f46c..905bfa5 100644
--- a/src/ca-detail/ca-sqlite.cpp
+++ b/src/ca-detail/ca-sqlite.cpp
@@ -113,7 +113,7 @@
   sqlite3_close(m_database);
 }
 
-CertificateRequest
+RequestState
 CaSqlite::getRequest(const std::string& requestId)
 {
   Sqlite3Statement statement(m_database,
@@ -136,13 +136,13 @@
     auto remainingTime = statement.getInt(9);
     auto requestType = static_cast<RequestType>(statement.getInt(10));
     if (challengeType != "") {
-      return CertificateRequest(caName, requestId, requestType, status, cert,
+      return RequestState(caName, requestId, requestType, status, cert,
                                 challengeType, challengeStatus, time::fromIsoString(challengeTp),
                                 remainingTries, time::seconds(remainingTime),
                                 convertString2Json(challengeSecrets));
     }
     else {
-      return CertificateRequest(caName, requestId, requestType, status, cert);
+      return RequestState(caName, requestId, requestType, status, cert);
     }
   }
   else {
@@ -151,7 +151,7 @@
 }
 
 void
-CaSqlite::addRequest(const CertificateRequest& request)
+CaSqlite::addRequest(const RequestState& request)
 {
   // check whether request is there already
   auto keyNameTlv = request.m_cert.getKeyName().wireEncode();
@@ -197,7 +197,7 @@
 }
 
 void
-CaSqlite::updateRequest(const CertificateRequest& request)
+CaSqlite::updateRequest(const RequestState& request)
 {
   Sqlite3Statement statement(m_database,
                              R"_SQLTEXT_(UPDATE CertRequests
@@ -228,10 +228,10 @@
   }
 }
 
-std::list<CertificateRequest>
+std::list<RequestState>
 CaSqlite::listAllRequests()
 {
-  std::list<CertificateRequest> result;
+  std::list<RequestState> result;
   Sqlite3Statement statement(m_database, R"_SQLTEXT_(SELECT id, request_id, ca_name, status,
                              challenge_status, cert_key_name, cert_request, challenge_type, challenge_secrets,
                              challenge_tp, remaining_tries, remaining_time, request_type
@@ -249,22 +249,22 @@
     auto remainingTime = statement.getInt(11);
     auto requestType = static_cast<RequestType>(statement.getInt(12));
     if (challengeType != "") {
-      result.push_back(CertificateRequest(caName, requestId, requestType, status, cert,
+      result.push_back(RequestState(caName, requestId, requestType, status, cert,
                                           challengeType, challengeStatus, time::fromIsoString(challengeTp),
                                           remainingTries, time::seconds(remainingTime),
                                           convertString2Json(challengeSecrets)));
     }
     else {
-      result.push_back(CertificateRequest(caName, requestId, requestType, status, cert));
+      result.push_back(RequestState(caName, requestId, requestType, status, cert));
     }
   }
   return result;
 }
 
-std::list<CertificateRequest>
+std::list<RequestState>
 CaSqlite::listAllRequests(const Name& caName)
 {
-  std::list<CertificateRequest> result;
+  std::list<RequestState> result;
   Sqlite3Statement statement(m_database,
                              R"_SQLTEXT_(SELECT id, request_id, ca_name, status,
                              challenge_status, cert_key_name, cert_request, challenge_type, challenge_secrets,
@@ -285,13 +285,13 @@
     auto remainingTime = statement.getInt(11);
     auto requestType = static_cast<RequestType>(statement.getInt(12));
     if (challengeType != "") {
-      result.push_back(CertificateRequest(caName, requestId, requestType, status, cert,
+      result.push_back(RequestState(caName, requestId, requestType, status, cert,
                                           challengeType, challengeStatus, time::fromIsoString(challengeTp),
                                           remainingTries, time::seconds(remainingTime),
                                           convertString2Json(challengeSecrets)));
     }
     else {
-      result.push_back(CertificateRequest(caName, requestId, requestType, status, cert));
+      result.push_back(RequestState(caName, requestId, requestType, status, cert));
     }
   }
   return result;
diff --git a/src/ca-detail/ca-sqlite.hpp b/src/ca-detail/ca-sqlite.hpp
index 200361d..2d22a21 100644
--- a/src/ca-detail/ca-sqlite.hpp
+++ b/src/ca-detail/ca-sqlite.hpp
@@ -22,7 +22,7 @@
 #define NDNCERT_CA_DETAIL_CA_SQLITE_HPP
 
 #include "../ca-module.hpp"
-#include "../certificate-request.hpp"
+#include "../request-state.hpp"
 
 struct sqlite3;
 
@@ -41,22 +41,22 @@
 
 public:
   // certificate request related
-  CertificateRequest
+  RequestState
   getRequest(const std::string& requestId) override;
 
   void
-  addRequest(const CertificateRequest& request) override;
+  addRequest(const RequestState& request) override;
 
   void
-  updateRequest(const CertificateRequest& request) override;
+  updateRequest(const RequestState& request) override;
 
   void
   deleteRequest(const std::string& requestId) override;
 
-  std::list<CertificateRequest>
+  std::list<RequestState>
   listAllRequests() override;
 
-  std::list<CertificateRequest>
+  std::list<RequestState>
   listAllRequests(const Name& caName) override;
 
   // certificate related
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index bf98856..0c5373f 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -334,7 +334,7 @@
 
   // create new request instance
   std::string requestId = std::to_string(random::generateWord64());
-  CertificateRequest certRequest(m_config.m_caPrefix, requestId, requestType, Status::BEFORE_CHALLENGE, *clientCert);
+  RequestState certRequest(m_config.m_caPrefix, requestId, requestType, Status::BEFORE_CHALLENGE, *clientCert);
   m_storage->addRequest(certRequest);
   Data result;
   result.setName(request.getName());
@@ -362,7 +362,7 @@
 CaModule::onChallenge(const Interest& request)
 {
   // get certificate request state
-  CertificateRequest certRequest = getCertificateRequest(request);
+  RequestState certRequest = getCertificateRequest(request);
   if (certRequest.m_requestId == "") {
     _LOG_ERROR("No certificate request state can be found.");
     m_face.put(generateErrorDataPacket(request.getName(), ErrorCode::INVALID_PARAMETER,
@@ -461,7 +461,7 @@
 }
 
 security::v2::Certificate
-CaModule::issueCertificate(const CertificateRequest& certRequest)
+CaModule::issueCertificate(const RequestState& certRequest)
 {
   auto expectedPeriod =
       certRequest.m_cert.getValidityPeriod().getPeriod();
@@ -483,11 +483,11 @@
   return newCert;
 }
 
-CertificateRequest
+RequestState
 CaModule::getCertificateRequest(const Interest& request)
 {
   std::string requestId;
-  CertificateRequest certRequest;
+  RequestState certRequest;
   try {
     requestId = readString(request.getName().at(m_config.m_caPrefix.size() + 2));
   }
diff --git a/src/ca-module.hpp b/src/ca-module.hpp
index f288f65..3bb3a1e 100644
--- a/src/ca-module.hpp
+++ b/src/ca-module.hpp
@@ -92,11 +92,11 @@
   void
   onRegisterFailed(const std::string& reason);
 
-  CertificateRequest
+  RequestState
   getCertificateRequest(const Interest& request);
 
   security::v2::Certificate
-  issueCertificate(const CertificateRequest& certRequest);
+  issueCertificate(const RequestState& certRequest);
 
   void
   registerPrefix();
diff --git a/src/ca-storage.hpp b/src/ca-storage.hpp
index 2cf7b7e..3abba7f 100644
--- a/src/ca-storage.hpp
+++ b/src/ca-storage.hpp
@@ -21,7 +21,7 @@
 #ifndef NDNCERT_CA_STORAGE_HPP
 #define NDNCERT_CA_STORAGE_HPP
 
-#include "certificate-request.hpp"
+#include "request-state.hpp"
 
 namespace ndn {
 namespace ndncert {
@@ -42,22 +42,22 @@
   ~CaStorage();
 
 public: // certificate request related
-  virtual CertificateRequest
+  virtual RequestState
   getRequest(const std::string& requestId) = 0;
 
   virtual void
-  addRequest(const CertificateRequest& request) = 0;
+  addRequest(const RequestState& request) = 0;
 
   virtual void
-  updateRequest(const CertificateRequest& request) = 0;
+  updateRequest(const RequestState& request) = 0;
 
   virtual void
   deleteRequest(const std::string& requestId) = 0;
 
-  virtual std::list<CertificateRequest>
+  virtual std::list<RequestState>
   listAllRequests() = 0;
 
-  virtual std::list<CertificateRequest>
+  virtual std::list<RequestState>
   listAllRequests(const Name& caName) = 0;
 
 public: // certificate related
diff --git a/src/challenge-module.cpp b/src/challenge-module.cpp
index 38cd284..7e97830 100644
--- a/src/challenge-module.cpp
+++ b/src/challenge-module.cpp
@@ -71,7 +71,7 @@
 }
 
 std::tuple<ErrorCode, std::string>
-ChallengeModule::returnWithError(CertificateRequest& request, ErrorCode errorCode, std::string&& errorInfo)
+ChallengeModule::returnWithError(RequestState& request, ErrorCode errorCode, std::string&& errorInfo)
 {
   request.m_status = Status::FAILURE;
   request.m_challengeType = "";
@@ -80,7 +80,7 @@
 }
 
 std::tuple<ErrorCode, std::string>
-ChallengeModule::returnWithNewChallengeStatus(CertificateRequest& request, const std::string& challengeStatus,
+ChallengeModule::returnWithNewChallengeStatus(RequestState& request, const std::string& challengeStatus,
                                               JsonSection&& challengeSecret, size_t remainingTries, time::seconds remainingTime)
 {
   request.m_status = Status::CHALLENGE;
@@ -90,7 +90,7 @@
 }
 
 std::tuple<ErrorCode, std::string>
-ChallengeModule::returnWithSuccess(CertificateRequest& request)
+ChallengeModule::returnWithSuccess(RequestState& request)
 {
   request.m_status = Status::PENDING;
   request.m_challengeType = CHALLENGE_TYPE;
diff --git a/src/challenge-module.hpp b/src/challenge-module.hpp
index be17e10..bef26b5 100644
--- a/src/challenge-module.hpp
+++ b/src/challenge-module.hpp
@@ -21,11 +21,9 @@
 #ifndef NDNCERT_CHALLENGE_MODULE_HPP
 #define NDNCERT_CHALLENGE_MODULE_HPP
 
+#include "request-state.hpp"
 #include <tuple>
 
-#include "certificate-request.hpp"
-#include "ndncert-common.hpp"
-
 namespace ndn {
 namespace ndncert {
 
@@ -52,7 +50,7 @@
 
   // For CA
   virtual std::tuple<ErrorCode, std::string>
-  handleChallengeRequest(const Block& params, CertificateRequest& request) = 0;
+  handleChallengeRequest(const Block& params, RequestState& request) = 0;
 
   // For Client
   virtual std::vector<std::tuple<std::string, std::string>>
@@ -69,14 +67,14 @@
 protected:
   // used by challenge modules
   std::tuple<ErrorCode, std::string>
-  returnWithError(CertificateRequest& request, ErrorCode errorCode, std::string&& errorInfo);
+  returnWithError(RequestState& request, ErrorCode errorCode, std::string&& errorInfo);
 
   std::tuple<ErrorCode, std::string>
-  returnWithNewChallengeStatus(CertificateRequest& request, const std::string& challengeStatus,
+  returnWithNewChallengeStatus(RequestState& request, const std::string& challengeStatus,
                                JsonSection&& challengeSecret, size_t remainingTries, time::seconds remainingTime);
 
   std::tuple<ErrorCode, std::string>
-  returnWithSuccess(CertificateRequest& request);
+  returnWithSuccess(RequestState& request);
 
 public:
   const std::string CHALLENGE_TYPE;
diff --git a/src/challenge-module/challenge-credential.cpp b/src/challenge-module/challenge-credential.cpp
index a41aa56..7102434 100644
--- a/src/challenge-module/challenge-credential.cpp
+++ b/src/challenge-module/challenge-credential.cpp
@@ -74,7 +74,7 @@
 
 // For CA
 std::tuple<ErrorCode, std::string>
-ChallengeCredential::handleChallengeRequest(const Block& params, CertificateRequest& request)
+ChallengeCredential::handleChallengeRequest(const Block& params, RequestState& request)
 {
   params.parse();
   if (m_trustAnchors.empty()) {
diff --git a/src/challenge-module/challenge-credential.hpp b/src/challenge-module/challenge-credential.hpp
index 93838a8..e356289 100644
--- a/src/challenge-module/challenge-credential.hpp
+++ b/src/challenge-module/challenge-credential.hpp
@@ -53,7 +53,7 @@
 
   // For CA
   std::tuple<ErrorCode, std::string>
-  handleChallengeRequest(const Block& params, CertificateRequest& request) override;
+  handleChallengeRequest(const Block& params, RequestState& request) override;
 
   // For Client
   std::vector<std::tuple<std::string, std::string>>
diff --git a/src/challenge-module/challenge-email.cpp b/src/challenge-module/challenge-email.cpp
index 2e9e133..327fb79 100644
--- a/src/challenge-module/challenge-email.cpp
+++ b/src/challenge-module/challenge-email.cpp
@@ -45,7 +45,7 @@
 
 // For CA
 std::tuple<ErrorCode, std::string>
-ChallengeEmail::handleChallengeRequest(const Block& params, CertificateRequest& request)
+ChallengeEmail::handleChallengeRequest(const Block& params, RequestState& request)
 {
   params.parse();
   auto currentTime = time::system_clock::now();
@@ -159,7 +159,7 @@
 
 void
 ChallengeEmail::sendEmail(const std::string& emailAddress, const std::string& secret,
-                          const CertificateRequest& request) const
+                          const RequestState& request) const
 {
   std::string command = m_sendEmailScript;
   command += " \"" + emailAddress + "\" \"" + secret + "\" \"" + request.m_caPrefix.toUri() + "\" \"" + request.m_cert.getName().toUri() + "\"";
diff --git a/src/challenge-module/challenge-email.hpp b/src/challenge-module/challenge-email.hpp
index 42a329d..f853e95 100644
--- a/src/challenge-module/challenge-email.hpp
+++ b/src/challenge-module/challenge-email.hpp
@@ -22,8 +22,6 @@
 #define NDNCERT_CHALLENGE_EMAIL_HPP
 
 #include "../challenge-module.hpp"
-#include <ndn-cxx/util/time.hpp>
-#include <ndn-cxx/encoding/block.hpp>
 
 namespace ndn {
 namespace ndncert {
@@ -59,7 +57,7 @@
 
   // For CA
   std::tuple<ErrorCode, std::string>
-  handleChallengeRequest(const Block& params, CertificateRequest& request) override;
+  handleChallengeRequest(const Block& params, RequestState& request) override;
 
   // For Client
   std::vector<std::tuple<std::string, std::string>>
@@ -75,7 +73,7 @@
 
   void
   sendEmail(const std::string& emailAddress, const std::string& secret,
-            const CertificateRequest& request) const;
+            const RequestState& request) const;
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
   // challenge status
diff --git a/src/challenge-module/challenge-pin.cpp b/src/challenge-module/challenge-pin.cpp
index caad97d..4853eed 100644
--- a/src/challenge-module/challenge-pin.cpp
+++ b/src/challenge-module/challenge-pin.cpp
@@ -41,7 +41,7 @@
 
 // For CA
 std::tuple<ErrorCode, std::string>
-ChallengePin::handleChallengeRequest(const Block& params, CertificateRequest& request)
+ChallengePin::handleChallengeRequest(const Block& params, RequestState& request)
 {
   params.parse();
   auto currentTime = time::system_clock::now();
diff --git a/src/challenge-module/challenge-pin.hpp b/src/challenge-module/challenge-pin.hpp
index 9e7d8b0..0b73cb2 100644
--- a/src/challenge-module/challenge-pin.hpp
+++ b/src/challenge-module/challenge-pin.hpp
@@ -22,7 +22,6 @@
 #define NDNCERT_CHALLENGE_PIN_HPP
 
 #include "../challenge-module.hpp"
-#include <ndn-cxx/util/time.hpp>
 
 namespace ndn {
 namespace ndncert {
@@ -53,7 +52,7 @@
 
   // For CA
   std::tuple<ErrorCode, std::string>
-  handleChallengeRequest(const Block& params, CertificateRequest& request) override;
+  handleChallengeRequest(const Block& params, RequestState& request) override;
 
   // For Client
   std::vector<std::tuple<std::string, std::string>>
diff --git a/src/client-config.hpp b/src/client-config.hpp
index 2d74cf6..0665808 100644
--- a/src/client-config.hpp
+++ b/src/client-config.hpp
@@ -21,7 +21,7 @@
 #ifndef NDNCERT_CLIENT_CONFIG_HPP
 #define NDNCERT_CLIENT_CONFIG_HPP
 
-#include "certificate-request.hpp"
+#include "request-state.hpp"
 #include <ndn-cxx/security/v2/certificate.hpp>
 
 namespace ndn {
diff --git a/src/client-module.hpp b/src/client-module.hpp
index 47a5f63..c439d3c 100644
--- a/src/client-module.hpp
+++ b/src/client-module.hpp
@@ -22,7 +22,7 @@
 #define NDNCERT_CLIENT_MODULE_HPP
 
 #include "client-config.hpp"
-#include "certificate-request.hpp"
+#include "request-state.hpp"
 #include "crypto-support/crypto-helper.hpp"
 
 namespace ndn {
diff --git a/src/crypto-support/crypto-helper.hpp b/src/crypto-support/crypto-helper.hpp
index 53f57f1..ad8aa22 100644
--- a/src/crypto-support/crypto-helper.hpp
+++ b/src/crypto-support/crypto-helper.hpp
@@ -21,11 +21,10 @@
 #ifndef NDNCERT_CRYPTO_SUPPORT_CRYPTO_HELPER_HPP
 #define NDNCERT_CRYPTO_SUPPORT_CRYPTO_HELPER_HPP
 
+#include "request-state.hpp"
 #include <openssl/ec.h>
 #include <openssl/evp.h>
 
-#include "certificate-request.hpp"
-
 namespace ndn {
 namespace ndncert {
 
diff --git a/src/protocol-detail/challenge.cpp b/src/protocol-detail/challenge.cpp
index b8823e0..61a3519 100644
--- a/src/protocol-detail/challenge.cpp
+++ b/src/protocol-detail/challenge.cpp
@@ -20,13 +20,13 @@
 
 #include "challenge.hpp"
 #include "../ndncert-common.hpp"
-#include "../certificate-request.hpp"
+#include "../request-state.hpp"
 
 namespace ndn {
 namespace ndncert {
 
 Block
-CHALLENGE::encodeDataPayload(const CertificateRequest& request)
+CHALLENGE::encodeDataPayload(const RequestState& request)
 {
   Block response = makeEmptyBlock(tlv_encrypted_payload);
   response.push_back(makeNonNegativeIntegerBlock(tlv_status, static_cast<size_t>(request.m_status)));
diff --git a/src/protocol-detail/challenge.hpp b/src/protocol-detail/challenge.hpp
index 1ff74fd..aafcd42 100644
--- a/src/protocol-detail/challenge.hpp
+++ b/src/protocol-detail/challenge.hpp
@@ -21,8 +21,7 @@
 #ifndef NDNCERT_PROTOCOL_DETAIL_CHALLENGE_HPP
 #define NDNCERT_PROTOCOL_DETAIL_CHALLENGE_HPP
 
-#include "../certificate-request.hpp"
-#include <ndn-cxx/encoding/block.hpp>
+#include "../request-state.hpp"
 
 namespace ndn {
 namespace ndncert {
@@ -30,7 +29,7 @@
 class CHALLENGE {
 public:
   static Block
-  encodeDataPayload(const CertificateRequest& request);
+  encodeDataPayload(const RequestState& request);
 };
 
 }  // namespace ndncert
diff --git a/src/protocol-detail/new.cpp b/src/protocol-detail/new.cpp
index 243865a..cd7b39c 100644
--- a/src/protocol-detail/new.cpp
+++ b/src/protocol-detail/new.cpp
@@ -53,7 +53,7 @@
 
 Block
 NEW::encodeDataContent(const std::string& ecdhKey, const std::string& salt,
-                             const CertificateRequest& request,
+                             const RequestState& request,
                              const std::list<std::string>& challenges)
 {
   Block response = makeEmptyBlock(tlv::Content);
diff --git a/src/protocol-detail/new.hpp b/src/protocol-detail/new.hpp
index 63bec73..353ebc2 100644
--- a/src/protocol-detail/new.hpp
+++ b/src/protocol-detail/new.hpp
@@ -21,10 +21,7 @@
 #ifndef NDNCERT_PROTOCOL_DETAIL_NEW_HPP
 #define NDNCERT_PROTOCOL_DETAIL_NEW_HPP
 
-#include <ndn-cxx/security/v2/certificate.hpp>
-
-#include "../certificate-request.hpp"
-#include "ndn-cxx/encoding/block.hpp"
+#include "../request-state.hpp"
 
 namespace ndn {
 namespace ndncert {
@@ -44,7 +41,7 @@
    */
   static Block
   encodeDataContent(const std::string& ecdhKey, const std::string& salt,
-                    const CertificateRequest& request,
+                    const RequestState& request,
                     const std::list<std::string>& challenges);
 };
 
diff --git a/src/protocol-detail/revoke.cpp b/src/protocol-detail/revoke.cpp
index f8e3142..0123b3f 100644
--- a/src/protocol-detail/revoke.cpp
+++ b/src/protocol-detail/revoke.cpp
@@ -53,7 +53,7 @@
 
 Block
 REVOKE::encodeDataContent(const std::string& ecdhKey, const std::string& salt,
-                             const CertificateRequest& request,
+                             const RequestState& request,
                              const std::list<std::string>& challenges)
 {
   Block response = makeEmptyBlock(tlv::Content);
diff --git a/src/protocol-detail/revoke.hpp b/src/protocol-detail/revoke.hpp
index 665ed11..9f02c43 100644
--- a/src/protocol-detail/revoke.hpp
+++ b/src/protocol-detail/revoke.hpp
@@ -21,9 +21,7 @@
 #ifndef NDNCERT_PROTOCOL_DETAIL_REVOKE_HPP
 #define NDNCERT_PROTOCOL_DETAIL_REVOKE_HPP
 
-#include "../certificate-request.hpp"
-#include "ndn-cxx/encoding/block.hpp"
-#include <ndn-cxx/security/v2/certificate.hpp>
+#include "../request-state.hpp"
 
 namespace ndn {
 namespace ndncert {
@@ -35,7 +33,7 @@
 
   static Block
   encodeDataContent(const std::string& ecdhKey, const std::string& salt,
-                             const CertificateRequest& request,
+                             const RequestState& request,
                              const std::list<std::string>& challenges);
 };
 
diff --git a/src/certificate-request.cpp b/src/request-state.cpp
similarity index 89%
rename from src/certificate-request.cpp
rename to src/request-state.cpp
index 36ee00b..1cc696c 100644
--- a/src/certificate-request.cpp
+++ b/src/request-state.cpp
@@ -18,7 +18,7 @@
  * See AUTHORS.md for complete list of ndncert authors and contributors.
  */
 
-#include "certificate-request.hpp"
+#include "request-state.hpp"
 #include <ndn-cxx/util/indented-stream.hpp>
 
 namespace ndn {
@@ -36,13 +36,13 @@
 {
 }
 
-CertificateRequest::CertificateRequest()
+RequestState::RequestState()
     : m_requestType(RequestType::NOTINITIALIZED)
     , m_status(Status::NOT_STARTED)
 {
 }
 
-CertificateRequest::CertificateRequest(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
+RequestState::RequestState(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
                                        const security::v2::Certificate& cert)
     : m_caPrefix(caName)
     , m_requestId(requestId)
@@ -52,7 +52,7 @@
 {
 }
 
-CertificateRequest::CertificateRequest(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
+RequestState::RequestState(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
                                        const security::v2::Certificate& cert, const std::string& challengeType,
                                        const std::string& challengeStatus, const system_clock::TimePoint& challengeTp,
                                        size_t remainingTries, time::seconds remainingTime, JsonSection&& challengeSecrets)
@@ -67,7 +67,7 @@
 }
 
 std::ostream&
-operator<<(std::ostream& os, const CertificateRequest& request)
+operator<<(std::ostream& os, const RequestState& request)
 {
   os << "Request's CA name:\n";
   os << "  " << request.m_caPrefix << "\n";
diff --git a/src/certificate-request.hpp b/src/request-state.hpp
similarity index 82%
rename from src/certificate-request.hpp
rename to src/request-state.hpp
index ee52218..b5dc430 100644
--- a/src/certificate-request.hpp
+++ b/src/request-state.hpp
@@ -18,8 +18,8 @@
  * See AUTHORS.md for complete list of ndncert authors and contributors.
  */
 
-#ifndef NDNCERT_CERTIFICATE_REQUEST_HPP
-#define NDNCERT_CERTIFICATE_REQUEST_HPP
+#ifndef NDNCERT_REQUEST_STATE_HPP
+#define NDNCERT_REQUEST_STATE_HPP
 
 #include "ndncert-common.hpp"
 
@@ -44,12 +44,12 @@
  * m_challengeDefinedField to finish verification.
  *
  */
-class CertificateRequest {
+class RequestState {
 public:
-  CertificateRequest();
-  CertificateRequest(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
+  RequestState();
+  RequestState(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
                      const security::v2::Certificate& cert);
-  CertificateRequest(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
+  RequestState(const Name& caName, const std::string& requestId, RequestType requestType, Status status,
                      const security::v2::Certificate& cert, const std::string& challengeType,
                      const std::string& challengeStatus, const system_clock::TimePoint& challengeTp,
                      size_t remainingTries, time::seconds remainingTime, JsonSection&& challengeSecrets);
@@ -66,9 +66,9 @@
 };
 
 std::ostream&
-operator<<(std::ostream& os, const CertificateRequest& request);
+operator<<(std::ostream& os, const RequestState& request);
 
 }  // namespace ndncert
 }  // namespace ndn
 
-#endif  // NDNCERT_CERTIFICATE_REQUEST_HPP
+#endif  // NDNCERT_REQUEST_STATE_HPP
diff --git a/tests/unit-tests/ca-memory.t.cpp b/tests/unit-tests/ca-memory.t.cpp
index 1f50b99..7db815a 100644
--- a/tests/unit-tests/ca-memory.t.cpp
+++ b/tests/unit-tests/ca-memory.t.cpp
@@ -82,7 +82,7 @@
   auto cert1 = key1.getDefaultCertificate();
 
   // add operation
-  CertificateRequest request1(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert1);
+  RequestState request1(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert1);
   BOOST_CHECK_NO_THROW(storage.addRequest(request1));
 
   // get operation
@@ -95,7 +95,7 @@
   json.put("code", "1234");
 
   // update operation
-  CertificateRequest request2(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert1,
+  RequestState request2(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert1,
                               "email", "test", time::system_clock::now(), 3, time::seconds(3600), std::move(json));
   storage.updateRequest(request2);
   result = storage.getRequest("123");
@@ -106,7 +106,7 @@
   auto identity2 = addIdentity(Name("/ndn/site2"));
   auto key2 = identity2.getDefaultKey();
   auto cert2 = key2.getDefaultCertificate();
-  CertificateRequest request3(Name("/ndn/site2"), "456", RequestType::NEW, Status::BEFORE_CHALLENGE, cert2);
+  RequestState request3(Name("/ndn/site2"), "456", RequestType::NEW, Status::BEFORE_CHALLENGE, cert2);
   storage.addRequest(request3);
 
   // list operation
diff --git a/tests/unit-tests/ca-module.t.cpp b/tests/unit-tests/ca-module.t.cpp
index 4e3a94a..2bee0c4 100644
--- a/tests/unit-tests/ca-module.t.cpp
+++ b/tests/unit-tests/ca-module.t.cpp
@@ -427,7 +427,7 @@
   signatureInfo.setValidityPeriod(security::ValidityPeriod(time::system_clock::now(),
                                                            time::system_clock::now() + time::hours(10)));
   m_keyChain.sign(clientCert, signingByKey(clientKey.getName()).setSignatureInfo(signatureInfo));
-  CertificateRequest certRequest(Name("/ndn"), "122", RequestType::NEW, Status::SUCCESS, clientCert);
+  RequestState certRequest(Name("/ndn"), "122", RequestType::NEW, Status::SUCCESS, clientCert);
   auto issuedCert = ca.issueCertificate(certRequest);
 
   ClientModule client(m_keyChain);
diff --git a/tests/unit-tests/ca-sqlite.t.cpp b/tests/unit-tests/ca-sqlite.t.cpp
index 779532d..754009a 100644
--- a/tests/unit-tests/ca-sqlite.t.cpp
+++ b/tests/unit-tests/ca-sqlite.t.cpp
@@ -81,7 +81,7 @@
   auto cert1 = key1.getDefaultCertificate();
 
   // add operation
-  CertificateRequest request1(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert1);
+  RequestState request1(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert1);
   BOOST_CHECK_NO_THROW(storage.addRequest(request1));
 
   // get operation
@@ -93,7 +93,7 @@
   // update operation
   JsonSection json;
   json.put("test", "4567");
-  CertificateRequest request2(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert1,
+  RequestState request2(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert1,
                              "email", "test", time::system_clock::now(), 3, time::seconds(3600), std::move(json));
   storage.updateRequest(request2);
   result = storage.getRequest("123");
@@ -104,7 +104,7 @@
   auto identity2 = addIdentity(Name("/ndn/site2"));
   auto key2 = identity2.getDefaultKey();
   auto cert2 = key2.getDefaultCertificate();
-  CertificateRequest request3(Name("/ndn/site2"), "456", RequestType::NEW, Status::BEFORE_CHALLENGE, cert2);
+  RequestState request3(Name("/ndn/site2"), "456", RequestType::NEW, Status::BEFORE_CHALLENGE, cert2);
   storage.addRequest(request3);
 
   // list operation
diff --git a/tests/unit-tests/challenge-credential.t.cpp b/tests/unit-tests/challenge-credential.t.cpp
index ad2f9b3..cc5a8ac 100644
--- a/tests/unit-tests/challenge-credential.t.cpp
+++ b/tests/unit-tests/challenge-credential.t.cpp
@@ -55,7 +55,7 @@
   auto identityA = addIdentity(Name("/example"));
   auto keyA = identityA.getDefaultKey();
   auto certA = key.getDefaultCertificate();
-  CertificateRequest request(Name("/example"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, certA);
+  RequestState request(Name("/example"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, certA);
 
   // create requester's credential
   auto identityB = addIdentity(Name("/trust/cert"));
diff --git a/tests/unit-tests/challenge-email.t.cpp b/tests/unit-tests/challenge-email.t.cpp
index 8858385..9faf36d 100644
--- a/tests/unit-tests/challenge-email.t.cpp
+++ b/tests/unit-tests/challenge-email.t.cpp
@@ -45,7 +45,7 @@
   auto identity = addIdentity(Name("/ndn/site1"));
   auto key = identity.getDefaultKey();
   auto cert = key.getDefaultCertificate();
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
 
   Block paramTLV = makeEmptyBlock(tlv_encrypted_payload);
   paramTLV.push_back(makeStringBlock(tlv_parameter_key, ChallengeEmail::PARAMETER_KEY_EMAIL));
@@ -94,7 +94,7 @@
   auto identity = addIdentity(Name("/ndn/site1"));
   auto key = identity.getDefaultKey();
   auto cert = key.getDefaultCertificate();
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
 
   Block paramTLV = makeEmptyBlock(tlv_encrypted_payload);
   paramTLV.push_back(makeStringBlock(tlv_parameter_key, ChallengeEmail::PARAMETER_KEY_EMAIL));
@@ -113,7 +113,7 @@
   auto cert = key.getDefaultCertificate();
   JsonSection json;
   json.put(ChallengeEmail::PARAMETER_KEY_CODE, "4567");
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
                              "email", ChallengeEmail::NEED_CODE, time::system_clock::now(),
                              3, time::seconds(3600), std::move(json));
 
@@ -135,7 +135,7 @@
   auto cert = key.getDefaultCertificate();
   JsonSection json;
   json.put(ChallengeEmail::PARAMETER_KEY_CODE, "4567");
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
                              "email", ChallengeEmail::NEED_CODE, time::system_clock::now(),
                              3, time::seconds(3600), std::move(json));
 
diff --git a/tests/unit-tests/challenge-pin.t.cpp b/tests/unit-tests/challenge-pin.t.cpp
index f21813b..7cb3041 100644
--- a/tests/unit-tests/challenge-pin.t.cpp
+++ b/tests/unit-tests/challenge-pin.t.cpp
@@ -38,7 +38,7 @@
   auto identity = addIdentity(Name("/ndn/site1"));
   auto key = identity.getDefaultKey();
   auto cert = key.getDefaultCertificate();
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::BEFORE_CHALLENGE, cert);
 
   ChallengePin challenge;
   challenge.handleChallengeRequest(makeEmptyBlock(tlv_encrypted_payload), request);
@@ -55,7 +55,7 @@
   auto cert = key.getDefaultCertificate();
   JsonSection secret;
   secret.add(ChallengePin::PARAMETER_KEY_CODE, "12345");
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
                              "pin", ChallengePin::NEED_CODE, time::system_clock::now(),
                              3, time::seconds(3600), std::move(secret));
 
@@ -77,7 +77,7 @@
   auto cert = key.getDefaultCertificate();
   JsonSection secret;
   secret.add(ChallengePin::PARAMETER_KEY_CODE, "12345");
-  CertificateRequest request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
+  RequestState request(Name("/ndn/site1"), "123", RequestType::NEW, Status::CHALLENGE, cert,
                              "pin", ChallengePin::NEED_CODE, time::system_clock::now(),
                              3, time::seconds(3600), std::move(secret));
 
diff --git a/tools/ndncert-ca-server.cpp b/tools/ndncert-ca-server.cpp
index 59f4d44..1ecb532 100644
--- a/tools/ndncert-ca-server.cpp
+++ b/tools/ndncert-ca-server.cpp
@@ -82,7 +82,7 @@
   CaModule ca(face, keyChain, configFilePath);
 
   if (wantRepoOut) {
-      ca.setStatusUpdateCallback([&] (const CertificateRequest& request) {
+      ca.setStatusUpdateCallback([&] (const RequestState& request) {
           if (request.m_status == Status::SUCCESS && request.m_requestType == RequestType::NEW) {
             auto issuedCert = request.m_cert;
             boost::asio::ip::tcp::iostream requestStream;
diff --git a/tools/ndncert-ca-status.cpp b/tools/ndncert-ca-status.cpp
index 8403173..db93c69 100644
--- a/tools/ndncert-ca-status.cpp
+++ b/tools/ndncert-ca-status.cpp
@@ -53,7 +53,7 @@
   }
 
   CaSqlite storage;
-  std::list<CertificateRequest> requestList;
+  std::list<RequestState> requestList;
   std::list<security::v2::Certificate> certList;
   if (caNameString != "") {
     requestList = storage.listAllRequests(Name(caNameString));
