blob: c4a4fe3b565b3307975bff59a5d068f47d2ee738 [file] [log] [blame]
Alexander Afanasyevc169a812014-05-20 20:37:29 -04001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -08002/*
Alexander Afanasyev09236c22020-06-03 13:42:38 -04003 * Copyright (c) 2013-2020 Regents of the University of California.
Alexander Afanasyevdfa52c42014-04-24 21:10:11 -07004 *
5 * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
Alexander Afanasyevdfa52c42014-04-24 21:10:11 -07006 *
Alexander Afanasyevc169a812014-05-20 20:37:29 -04007 * ndn-cxx library is free software: you can redistribute it and/or modify it under the
8 * terms of the GNU Lesser General Public License as published by the Free Software
9 * Foundation, either version 3 of the License, or (at your option) any later version.
10 *
11 * ndn-cxx library is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
13 * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
14 *
15 * You should have received copies of the GNU General Public License and GNU Lesser
16 * General Public License along with ndn-cxx, e.g., in COPYING.md file. If not, see
17 * <http://www.gnu.org/licenses/>.
18 *
19 * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070020 */
21
Davide Pesavento4c1ad4c2020-11-16 21:12:02 -050022#ifndef NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
23#define NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070024
Alexander Afanasyev09236c22020-06-03 13:42:38 -040025#include "ndn-cxx/security/validator-config/common.hpp"
Davide Pesavento7e780642018-11-24 15:51:34 -050026
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080027#include <boost/property_tree/info_parser.hpp>
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070028
29namespace ndn {
30namespace security {
Alexander Afanasyev09236c22020-06-03 13:42:38 -040031inline namespace v2 {
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080032namespace validator_config {
33namespace tests {
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070034
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080035inline ConfigSection
36makeSection(const std::string& config)
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070037{
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080038 std::istringstream inputStream(config);
39 ConfigSection section;
40 boost::property_tree::read_info(inputStream, section);
41 return section;
42}
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070043
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080044} // namespace tests
45} // namespace validator_config
Alexander Afanasyev09236c22020-06-03 13:42:38 -040046} // inline namespace v2
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070047} // namespace security
48} // namespace ndn
49
Davide Pesavento4c1ad4c2020-11-16 21:12:02 -050050#endif // NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP