rib: Avoid use of orphaned ValidationPolicyConfig
Change-Id: Id1fa969a2e4b3c88a21cacdbbeda32d17834fe6f
Refs: #4759
diff --git a/rib/service.cpp b/rib/service.cpp
index c25e977..7557f2f 100644
--- a/rib/service.cpp
+++ b/rib/service.cpp
@@ -162,8 +162,8 @@
const std::string& key = item.first;
const ConfigSection& value = item.second;
if (key == CFG_LOCALHOST_SECURITY || key == CFG_LOCALHOP_SECURITY) {
- ndn::security::v2::validator_config::ValidationPolicyConfig policy;
- policy.load(value, filename);
+ ndn::ValidatorConfig testValidator(m_face);
+ testValidator.load(value, filename);
}
else if (key == CFG_PREFIX_PROPAGATE) {
// AutoPrefixPropagator does not support config dry-run