blob: b93bdb62fdaa329c3dba22b8e6fc8fea2c3de250 [file] [log] [blame]
Jeff Thompson3f3cfd32013-09-27 11:46:52 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/**
3 * Copyright (C) 2013 Regents of the University of California.
4 * @author: Yingdi Yu <yingdi@cs.ucla.edu>
5 * @author: Jeff Thompson <jefft0@remap.ucla.edu>
6 * See COPYING for copyright and distribution information.
7 */
8
Jeff Thompson25b4e612013-10-10 16:03:24 -07009#include <ndn-cpp/security/policy/no-verify-policy-manager.hpp>
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070010
11using namespace std;
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070012
13namespace ndn {
14
15NoVerifyPolicyManager::~NoVerifyPolicyManager()
16{
17}
18
19bool
20NoVerifyPolicyManager::skipVerifyAndTrust(const Data& data)
21{
22 return true;
23}
24
25bool
26NoVerifyPolicyManager::requireVerify(const Data& data)
27{
28 return false;
29}
30
Jeff Thompsonce115762013-12-18 14:59:56 -080031ptr_lib::shared_ptr<ValidationRequest>
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070032NoVerifyPolicyManager::checkVerificationPolicy
Jeff Thompsonce115762013-12-18 14:59:56 -080033 (const ptr_lib::shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed)
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070034{
35 onVerified(data);
Jeff Thompsonce115762013-12-18 14:59:56 -080036 return ptr_lib::shared_ptr<ValidationRequest>();
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070037}
38
39bool
40NoVerifyPolicyManager::checkSigningPolicy(const Name& dataName, const Name& certificateName)
41{
42 return true;
43}
44
45Name
46NoVerifyPolicyManager::inferSigningIdentity(const Name& dataName)
47{
48 return Name();
49}
50
51}