ca: set Data FreshnessPeriod in CaModule::issueCertificate()
Change-Id: I42a169f309e1069965b5f91ed8542a868a77c15b
diff --git a/src/ca-module.cpp b/src/ca-module.cpp
index ef41efc..be197d6 100644
--- a/src/ca-module.cpp
+++ b/src/ca-module.cpp
@@ -478,12 +478,13 @@
certName.append("NDNCERT").appendVersion();
newCert.setName(certName);
newCert.setContent(requestState.cert.getContent());
+ newCert.setFreshnessPeriod(1_h);
NDN_LOG_TRACE("cert request content " << requestState.cert);
SignatureInfo signatureInfo;
signatureInfo.setValidityPeriod(period);
ndn::security::SigningInfo signingInfo(ndn::security::SigningInfo::SIGNER_TYPE_ID,
m_config.caProfile.caPrefix, signatureInfo);
-
+ // Note: we should use KeyChain::makeCertificate() in future.
m_keyChain.sign(newCert, signingInfo);
NDN_LOG_TRACE("new cert got signed" << newCert);
return newCert;