blob: c984cf510a8614d2e34f71fba1c719e8a10e6dca [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/*
Davide Pesavento47ce2ee2023-05-09 01:33:33 -04003 * Copyright (c) 2013-2023 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
Davide Pesavento47ce2ee2023-05-09 01:33:33 -040029namespace ndn::tests {
30
31using ndn::security::validator_config::ConfigSection;
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070032
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080033inline ConfigSection
34makeSection(const std::string& config)
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070035{
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080036 std::istringstream inputStream(config);
37 ConfigSection section;
38 boost::property_tree::read_info(inputStream, section);
39 return section;
40}
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070041
Davide Pesavento47ce2ee2023-05-09 01:33:33 -040042} // namespace ndn::tests
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070043
Davide Pesavento4c1ad4c2020-11-16 21:12:02 -050044#endif // NDN_CXX_TESTS_UNIT_SECURITY_VALIDATOR_CONFIG_COMMON_HPP