All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | Public Attributes | List of all members
ValidatorFixture Class Reference

Copyright (C) 2017-2018 Regents of the University of California. More...

#include <validator-fixture.hpp>

Inheritance diagram for ValidatorFixture:
IdentityManagementFixture HierarchicalValidatorFixture ValidationPolicyCommandInterestFixture

Classes

class  TestFace
 TestFace extends Face to instantly simulate a call to expressInterest. More...
 

Public Member Functions

 ValidatorFixture (const ndn::ptr_lib::shared_ptr< ndn::ValidationPolicy > &policy)
 Create a ValidatorFixture to use the given policy. More...
 
void processInterestFromCache (const ndn::Interest &interest, const ndn::OnData &onData, const ndn::OnTimeout &onTimeout, const ndn::OnNetworkNack &onNetworkNack)
 
- Public Member Functions inherited from IdentityManagementFixture
bool saveCertificateToFile (const ndn::Data &data, const std::string &filePath)
 
ndn::ptr_lib::shared_ptr
< ndn::PibIdentity
addIdentity (const ndn::Name &identityName, const ndn::KeyParams &params=ndn::KeyChain::getDefaultKeyParams())
 Add an identity for the identityName. More...
 
bool saveCertificate (ndn::PibIdentity identity, const std::string &filePath)
 Save the identity's certificate to a file. More...
 
ndn::ptr_lib::shared_ptr
< ndn::PibIdentity
addSubCertificate (const ndn::Name &subIdentityName, const ndn::ptr_lib::shared_ptr< ndn::PibIdentity > &issuer, const ndn::KeyParams &params=ndn::KeyChain::getDefaultKeyParams())
 Issue a certificate for subIdentityName signed by issuer. More...
 
ndn::ptr_lib::shared_ptr
< ndn::CertificateV2
addCertificate (ndn::ptr_lib::shared_ptr< ndn::PibKey > &key, const std::string &issuerId)
 Add a self-signed certificate made from the key and issuer ID. More...
 

Public Attributes

TestFace face_
 
ndn::Validator validator_
 
ndn::ptr_lib::shared_ptr
< ndn::ValidationPolicy
policy_
 
ndn::CertificateCacheV2 cache_
 
- Public Attributes inherited from IdentityManagementFixture
ndn::KeyChain keyChain_
 

Detailed Description

Copyright (C) 2017-2018 Regents of the University of California.

Author
: Jeff Thompson jefft.nosp@m.0@re.nosp@m.map.u.nosp@m.cla..nosp@m.edu From ndn-cxx unit tests: https://github.com/named-data/ndn-cxx/blob/master/tests/unit-tests/validator-fixture.hpp

This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version, with the additional exemption that compiling, linking, and/or using OpenSSL is allowed.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this program. If not, see http://www.gnu.org/licenses/. A copy of the GNU Lesser General Public License is in the file COPYING. ValidatorFixture extends IdentityManagementFixture to use the given policy and to set up a test face to answer Interests.

Constructor & Destructor Documentation

ValidatorFixture::ValidatorFixture ( const ndn::ptr_lib::shared_ptr< ndn::ValidationPolicy > &  policy)

Create a ValidatorFixture to use the given policy.

Set the default face_.processInterest_ to use the cache_ to respond to expressInterest. To change this behavior, you can set face_.processInterest_ to your callback, or to null to always time out.

Parameters
policyThe ValidationPolicy used by validator_.

The documentation for this class was generated from the following files: