security: renaming PolicyManager classess to SecPolicy___ and re-organize security file layout
Change-Id: Ibca0333129a3d4465ff294c4d97d59808ae253f4
diff --git a/src/security/verifier.cpp b/src/security/verifier.cpp
index a2ba790..992d1f0 100644
--- a/src/security/verifier.cpp
+++ b/src/security/verifier.cpp
@@ -20,7 +20,7 @@
#include <ndn-cpp/security/verifier.hpp>
-#include <ndn-cpp/security/policy/policy-manager.hpp>
+#include <ndn-cpp/security/sec-policy.hpp>
#include <cryptopp/rsa.h>
@@ -36,12 +36,12 @@
INIT_LOGGER("ndn.Verifier");
namespace ndn {
-const ptr_lib::shared_ptr<PolicyManager> Verifier::DefaultPolicyManager = ptr_lib::shared_ptr<PolicyManager>();
+const ptr_lib::shared_ptr<SecPolicy> Verifier::DefaultPolicy = ptr_lib::shared_ptr<SecPolicy>();
-Verifier::Verifier(const ptr_lib::shared_ptr<PolicyManager> &policyManager /* = DefaultPolicyManager */)
- : policyManager_(policyManager)
+Verifier::Verifier(const ptr_lib::shared_ptr<SecPolicy> &policy /* = DefaultPolicy */)
+ : policy_(policy)
{
- if (policyManager_ == DefaultPolicyManager)
+ if (policy_ == DefaultPolicy)
{
// #ifdef USE_SIMPLE_POLICY_MANAGER
// Ptr<SimplePolicyManager> policyManager = Ptr<SimplePolicyManager>(new SimplePolicyManager());
@@ -63,7 +63,7 @@
// m_policyManager = policyManager;
//
// #else
- // policyManager_ = new NoVerifyPolicyManager();
+ // policy_ = new NoVerifyPolicyManager();
// #endif
}
}
@@ -73,7 +73,7 @@
(const ptr_lib::shared_ptr<Data>& data, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, int stepCount)
{
if (policies().requireVerify(*data)) {
- ptr_lib::shared_ptr<ValidationRequest> nextStep = policyManager_->checkVerificationPolicy
+ ptr_lib::shared_ptr<ValidationRequest> nextStep = policy_->checkVerificationPolicy
(data, stepCount, onVerified, onVerifyFailed);
if (static_cast<bool>(nextStep))
{