blob: 231e8ebfc3d26a0773ba62c45254377f141f6629 [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 Pesavento74daf742018-11-23 18:14:13 -05003 * Copyright (c) 2013-2018 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
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080022#ifndef NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
23#define NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070024
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080025#include <boost/property_tree/info_parser.hpp>
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070026
27namespace ndn {
28namespace security {
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080029namespace v2 {
30namespace validator_config {
31namespace tests {
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
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080042} // namespace tests
43} // namespace validator_config
44} // namespace v2
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070045} // namespace security
46} // namespace ndn
47
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080048#endif // NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP