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 | |
Yingdi Yu | 61ec272 | 2014-01-20 14:22:32 -0800 | [diff] [blame^] | 9 | #include <ndn-cpp-dev/security/sec-policy-no-verify.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 | |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 15 | SecPolicyNoVerify::~SecPolicyNoVerify() |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 16 | { |
| 17 | } |
| 18 | |
| 19 | bool |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 20 | SecPolicyNoVerify::skipVerifyAndTrust(const Data& data) |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 21 | { |
| 22 | return true; |
| 23 | } |
| 24 | |
| 25 | bool |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 26 | SecPolicyNoVerify::requireVerify(const Data& data) |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 27 | { |
| 28 | return false; |
| 29 | } |
| 30 | |
Jeff Thompson | ce11576 | 2013-12-18 14:59:56 -0800 | [diff] [blame] | 31 | ptr_lib::shared_ptr<ValidationRequest> |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 32 | SecPolicyNoVerify::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 |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 40 | SecPolicyNoVerify::checkSigningPolicy(const Name& dataName, const Name& certificateName) |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 41 | { |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | Name |
Yingdi Yu | 4f32463 | 2014-01-15 18:10:03 -0800 | [diff] [blame] | 46 | SecPolicyNoVerify::inferSigningIdentity(const Name& dataName) |
Jeff Thompson | 3f3cfd3 | 2013-09-27 11:46:52 -0700 | [diff] [blame] | 47 | { |
| 48 | return Name(); |
| 49 | } |
| 50 | |
| 51 | } |