blob: c2f7866bc4e34402eb6dc0b3a8a2500b25ea173f [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
Yingdi Yu4f324632014-01-15 18:10:03 -08009#include <ndn-cpp/security/sec-policy-no-verify.hpp>
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070010
11using namespace std;
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070012
13namespace ndn {
14
Yingdi Yu4f324632014-01-15 18:10:03 -080015SecPolicyNoVerify::~SecPolicyNoVerify()
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070016{
17}
18
19bool
Yingdi Yu4f324632014-01-15 18:10:03 -080020SecPolicyNoVerify::skipVerifyAndTrust(const Data& data)
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070021{
22 return true;
23}
24
25bool
Yingdi Yu4f324632014-01-15 18:10:03 -080026SecPolicyNoVerify::requireVerify(const Data& data)
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070027{
28 return false;
29}
30
Jeff Thompsonce115762013-12-18 14:59:56 -080031ptr_lib::shared_ptr<ValidationRequest>
Yingdi Yu4f324632014-01-15 18:10:03 -080032SecPolicyNoVerify::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
Yingdi Yu4f324632014-01-15 18:10:03 -080040SecPolicyNoVerify::checkSigningPolicy(const Name& dataName, const Name& certificateName)
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070041{
42 return true;
43}
44
45Name
Yingdi Yu4f324632014-01-15 18:10:03 -080046SecPolicyNoVerify::inferSigningIdentity(const Name& dataName)
Jeff Thompson3f3cfd32013-09-27 11:46:52 -070047{
48 return Name();
49}
50
51}