Add isListEnabled into client configuration
Change-Id: Ib3471fd0658e64040d5ffee653e297fa58f2cfd7
diff --git a/src/client-config.cpp b/src/client-config.cpp
index aeeaddc..e28407c 100644
--- a/src/client-config.cpp
+++ b/src/client-config.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2017, Regents of the University of California.
+ * Copyright (c) 2017-2018, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -62,6 +62,13 @@
item.m_caName = Name(configSection.get<std::string>("ca-prefix"));
item.m_caInfo = configSection.get<std::string>("ca-info");
item.m_probe = configSection.get("probe", "");
+ std::string listEnabledField = configSection.get("is-list-enabled", "false");
+ if (listEnabledField == "true") {
+ item.m_isListEnabled = true;
+ }
+ else {
+ item.m_isListEnabled = false;
+ }
item.m_targetedList = configSection.get("target-list", "");
std::istringstream ss(configSection.get<std::string>("certificate"));
diff --git a/src/client-config.hpp b/src/client-config.hpp
index 97c282b..72dd78f 100644
--- a/src/client-config.hpp
+++ b/src/client-config.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2017, Regents of the University of California.
+ * Copyright (c) 2017-2018, Regents of the University of California.
*
* This file is part of ndncert, a certificate management system based on NDN.
*
@@ -36,11 +36,12 @@
// The identity name of the CA. Extracted from config field "ca-prefix"
Name m_caName;
- // TODO: remove the caInfo, probe, and targetedList. Put them into the cert
// A brief introduction to the CA. Extracted from config field "ca-info"
std::string m_caInfo;
// An instruction for requesters to use _PROBE. Extracted from config field "probe"
std::string m_probe;
+ // Whether support list function
+ bool m_isListEnabled;
// An instruction for requesters to get a recommended CA. Extracted from config field "target-list"
std::string m_targetedList;