blob: 1083eb5fda1c56359d0819f1b6c30173e8500988 [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
Davide Pesavento7e780642018-11-24 15:51:34 -050025#include "ndn-cxx/security/v2/validator-config/common.hpp"
26
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 Afanasyeve5a19b82017-01-30 22:30:46 -080031namespace v2 {
32namespace 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
46} // namespace v2
Yingdi Yu48e8c0c2014-03-19 12:01:55 -070047} // namespace security
48} // namespace ndn
49
Alexander Afanasyeve5a19b82017-01-30 22:30:46 -080050#endif // NDN_TESTS_SECURITY_V2_VALIDATOR_CONFIG_COMMON_HPP