server fix
Change-Id: Icb2c89bf2e7c565a1a2acd4a4e02606b856ff28d
diff --git a/tools/ndncert-ca-server.cpp b/tools/ndncert-ca-server.cpp
index be0c07d..470aa39 100644
--- a/tools/ndncert-ca-server.cpp
+++ b/tools/ndncert-ca-server.cpp
@@ -119,14 +119,14 @@
if (wantRepoOut) {
writeDataToRepo(profileData);
ca.setStatusUpdateCallback([&](const CaState& request) {
- if (request.m_status == Status::SUCCESS) {
+ if (request.m_status == Status::SUCCESS && request.m_requestType == RequestType::NEW) {
writeDataToRepo(request.m_cert);
}
});
}
else {
ca.setStatusUpdateCallback([&](const CaState& request) {
- if (request.m_status == Status::SUCCESS) {
+ if (request.m_status == Status::SUCCESS && request.m_requestType == RequestType::NEW) {
cachedCertificates[request.m_cert.getName()] = request.m_cert;
}
});