security: Convert ValidatorConfig to ValidationPolicyConfig
The security API also provides a convenience ValidatorConfig helper.
Change-Id: Ic86dec4904b917361cb4740204de4b6710d2a386
Refs: #3920
diff --git a/src/security/v2/validation-policy.hpp b/src/security/v2/validation-policy.hpp
index 351ffed..d7a261b 100644
--- a/src/security/v2/validation-policy.hpp
+++ b/src/security/v2/validation-policy.hpp
@@ -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).
@@ -65,6 +65,20 @@
void
setInnerPolicy(unique_ptr<ValidationPolicy> innerPolicy);
+ /**
+ * @brief Check if inner policy is set
+ */
+ bool
+ hasInnerPolicy() const
+ {
+ return m_innerPolicy != nullptr;
+ }
+
+ /**
+ * @brief Return the inner policy
+ *
+ * If the inner policy was not set, behavior is undefined.
+ */
ValidationPolicy&
getInnerPolicy();