security: Add ValidationPolicyCommandInterest
Refs: #3920
Change-Id: I978e68979e4f9cfb58561054b9f87f8d65083d5d
diff --git a/src/security/v2/validation-state.cpp b/src/security/v2/validation-state.cpp
index 269ef2d..4267c7f 100644
--- a/src/security/v2/validation-state.cpp
+++ b/src/security/v2/validation-state.cpp
@@ -149,10 +149,10 @@
const InterestValidationSuccessCallback& successCb,
const InterestValidationFailureCallback& failureCb)
: m_interest(interest)
- , m_successCb(successCb)
, m_failureCb(failureCb)
{
- BOOST_ASSERT(m_successCb != nullptr);
+ afterSuccess.connect(successCb);
+ BOOST_ASSERT(successCb != nullptr);
BOOST_ASSERT(m_failureCb != nullptr);
}
@@ -169,7 +169,7 @@
{
if (verifySignature(m_interest, trustedCert)) {
NDN_LOG_TRACE_DEPTH("OK signature for interest `" << m_interest.getName() << "`");
- m_successCb(m_interest);
+ this->afterSuccess(m_interest);
BOOST_ASSERT(!m_hasOutcome);
m_hasOutcome = true;
}
@@ -183,7 +183,7 @@
InterestValidationState::bypassValidation()
{
NDN_LOG_TRACE_DEPTH("Signature verification bypassed for interest `" << m_interest.getName() << "`");
- m_successCb(m_interest);
+ this->afterSuccess(m_interest);
BOOST_ASSERT(!m_hasOutcome);
m_hasOutcome = true;
}