security: Allow reloading ValidationPolicyConfig / ValidatorConfig

Change-Id: Idba53c0b4e2cf645d3d0e6c76c57a1b54995462a
Refs: #4261
diff --git a/src/security/v2/trust-anchor-container.cpp b/src/security/v2/trust-anchor-container.cpp
index efb272f..80ef5cc 100644
--- a/src/security/v2/trust-anchor-container.cpp
+++ b/src/security/v2/trust-anchor-container.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -40,6 +40,12 @@
 }
 
 void
+TrustAnchorContainer::AnchorContainer::clear()
+{
+  AnchorContainerBase::clear();
+}
+
+void
 TrustAnchorContainer::insert(const std::string& groupId, Certificate&& cert)
 {
   auto group = m_groups.find(groupId);
@@ -64,6 +70,13 @@
   m_groups.insert(make_shared<DynamicTrustAnchorGroup>(m_anchors, groupId, path, refreshPeriod, isDir));
 }
 
+void
+TrustAnchorContainer::clear()
+{
+  m_groups.clear();
+  m_anchors.clear();
+}
+
 const Certificate*
 TrustAnchorContainer::find(const Name& keyName) const
 {