address comments
Change-Id: Id12b605453752cf947c81b6cdda582d93a4d2bcf
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index 89cddcf..e40a62d 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -306,8 +306,13 @@
}
RequestId id;
std::memcpy(id.data(), requestIdData, id.size());
- RequestState requestState(m_config.m_caProfile.m_caPrefix, id, requestType,
- Status::BEFORE_CHALLENGE, *clientCert, std::move(aesKey));
+ // initialize request state
+ RequestState requestState;
+ requestState.caPrefix = m_config.m_caProfile.m_caPrefix;
+ requestState.requestId = id;
+ requestState.requestType = requestType;
+ requestState.cert = *clientCert;
+ requestState.encryptionKey = aesKey;
try {
m_storage->addRequest(requestState);
}