Rename RequestState to CaState
- to prevent confusion with RequesterState
Change-Id: I56048e289fded44bf39dd1fe6a5e26ddd3938b99
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 324a859..658d9c5 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -326,8 +326,8 @@
// create new request instance
std::string requestId = std::to_string(random::generateWord64());
- RequestState requestState(m_config.m_caItem.m_caPrefix, requestId, requestType, Status::BEFORE_CHALLENGE, *clientCert,
- makeBinaryBlock(tlv::ContentType_Key, aesKey, sizeof(aesKey)));
+ CaState requestState(m_config.m_caItem.m_caPrefix, requestId, requestType, Status::BEFORE_CHALLENGE, *clientCert,
+ makeBinaryBlock(tlv::ContentType_Key, aesKey, sizeof(aesKey)));
m_storage->addRequest(requestState);
Data result;
result.setName(request.getName());
@@ -347,7 +347,7 @@
CaModule::onChallenge(const Interest& request)
{
// get certificate request state
- RequestState requestState = getCertificateRequest(request);
+ CaState requestState = getCertificateRequest(request);
if (requestState.m_requestId == "") {
_LOG_ERROR("No certificate request state can be found.");
m_face.put(generateErrorDataPacket(request.getName(), ErrorCode::INVALID_PARAMETER,
@@ -446,7 +446,7 @@
}
security::v2::Certificate
-CaModule::issueCertificate(const RequestState& requestState)
+CaModule::issueCertificate(const CaState& requestState)
{
auto expectedPeriod =
requestState.m_cert.getValidityPeriod().getPeriod();
@@ -468,11 +468,11 @@
return newCert;
}
-RequestState
+CaState
CaModule::getCertificateRequest(const Interest& request)
{
std::string requestId;
- RequestState requestState;
+ CaState requestState;
try {
requestId = readString(request.getName().at(m_config.m_caItem.m_caPrefix.size() + 2));
}