src: disable network interest in CertificateFetcherDirectFetch
refs: #4879
Change-Id: I6b34b34710bdfcdf0a82327637be83bc452b16d9
diff --git a/src/conf-parameter.cpp b/src/conf-parameter.cpp
index 948d804..8a2cb5a 100644
--- a/src/conf-parameter.cpp
+++ b/src/conf-parameter.cpp
@@ -31,6 +31,14 @@
// To be changed when breaking changes are made to sync
const uint64_t ConfParameter::SYNC_VERSION = 6;
+static std::unique_ptr<ndn::security::v2::CertificateFetcherDirectFetch>
+makeCertificateFetcher(ndn::Face& face)
+{
+ auto fetcher = std::make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face);
+ fetcher->setSendDirectInterestOnly(true);
+ return fetcher;
+}
+
ConfParameter::ConfParameter(ndn::Face& face, const std::string& confFileName)
: m_confFileName(confFileName)
, m_lsaRefreshTime(LSA_REFRESH_TIME_DEFAULT)
@@ -50,10 +58,10 @@
, m_syncProtocol(SYNC_PROTOCOL_CHRONOSYNC)
, m_adjl()
, m_npl()
- , m_validator(std::make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face))
+ , m_validator(makeCertificateFetcher(face))
, m_prefixUpdateValidator(std::make_unique<ndn::security::v2::CertificateFetcherDirectFetch>(face))
- {
- }
+{
+}
void
ConfParameter::writeLog()