Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 1 | /* -*- 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 Thompson | 25b4e61 | 2013-10-10 16:03:24 -0700 | [diff] [blame] | 9 | #include <ndn-cpp/security/policy/no-verify-policy-manager.hpp> |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 10 | |
| 11 | using namespace std; |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 12 | |
| 13 | namespace ndn { |
| 14 | |
| 15 | NoVerifyPolicyManager::~NoVerifyPolicyManager() |
| 16 | { |
| 17 | } |
| 18 | |
| 19 | bool |
| 20 | NoVerifyPolicyManager::skipVerifyAndTrust(const Data& data) |
| 21 | { |
| 22 | return true; |
| 23 | } |
| 24 | |
| 25 | bool |
| 26 | NoVerifyPolicyManager::requireVerify(const Data& data) |
| 27 | { |
| 28 | return false; |
| 29 | } |
| 30 | |
Jeff Thompson | ce11576 | 2013-12-18 14:59:56 -0800 | [diff] [blame] | 31 | ptr_lib::shared_ptr<ValidationRequest> |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 32 | NoVerifyPolicyManager::checkVerificationPolicy |
Jeff Thompson | ce11576 | 2013-12-18 14:59:56 -0800 | [diff] [blame] | 33 | (const ptr_lib::shared_ptr<Data>& data, int stepCount, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed) |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 34 | { |
| 35 | onVerified(data); |
Jeff Thompson | ce11576 | 2013-12-18 14:59:56 -0800 | [diff] [blame] | 36 | return ptr_lib::shared_ptr<ValidationRequest>(); |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | bool |
| 40 | NoVerifyPolicyManager::checkSigningPolicy(const Name& dataName, const Name& certificateName) |
| 41 | { |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | Name |
| 46 | NoVerifyPolicyManager::inferSigningIdentity(const Name& dataName) |
| 47 | { |
| 48 | return Name(); |
| 49 | } |
| 50 | |
| 51 | } |