CR fix 2
Change-Id: Ib5b7d7ff17f6ae31e9b6d905ef53d015a7389ccc
diff --git a/src/configuration.hpp b/src/configuration.hpp
index ec8ccb1..4e466e2 100644
--- a/src/configuration.hpp
+++ b/src/configuration.hpp
@@ -28,6 +28,21 @@
namespace ndncert {
struct CaProfile {
+public:
+ /**
+ * Parse the configuration json and modify current struct to the result.
+ * @param configJson the configuration json to parse
+ */
+ void
+ parse(const JsonSection& configJson);
+
+ /**
+ * @return the JSON representation of this profile.
+ */
+ JsonSection
+ toJson() const;
+
+public:
/**
* CA Name prefix (without /CA suffix).
*/
@@ -65,12 +80,6 @@
*/
std::shared_ptr<security::Certificate> m_cert;
- void
- parse(const JsonSection& configJson);
-
- JsonSection
- toJson() const;
-
private:
void
parseProbeParameters(const JsonSection& section);
@@ -82,19 +91,8 @@
namespace ca {
/**
- * @brief The function would be invoked whenever the certificate request status is updated.
- * The callback is used to notice the CA application or CA command line tool. The callback is
- * fired whenever a request instance is created, challenge status is updated, and when certificate
- * is issued.
- *
- * @param RequestState The state of the certificate request whose status is updated.
- */
-using StatusUpdateCallback = function<void(const RequestState&)>;
-
-/**
* @brief CA's configuration on NDNCERT.
- * For CA configuration format, please refer to:
- * https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3#213-ca-profile
+ * @sa https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3#213-ca-profile
*
* The format of CA configuration in JSON
* {
@@ -124,17 +122,14 @@
void
load(const std::string& fileName);
+public:
CaProfile m_caItem;
/**
- * Used for CA redirection as specified in
- * https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3-PROBE-Extensions#probe-extension-for-redirection
+ * Used for CA redirection
+ * @sa https://github.com/named-data/ndncert/wiki/NDNCERT-Protocol-0.3-PROBE-Extensions#probe-extension-for-redirection
*/
optional<std::vector<std::shared_ptr<security::Certificate>>> m_redirection = nullopt;
/**
- * StatusUpdate Callback function
- */
- StatusUpdateCallback m_statusUpdateCallback;
- /**
* Name Assignment Functions
*/
std::vector<std::unique_ptr<NameAssignmentFunc>> m_nameAssignmentFuncs;
@@ -146,9 +141,7 @@
/**
* @brief Represents Client configuration
- *
- * For Client configuration format, please refer to:
- * https://github.com/named-data/ndncert/wiki/Client-Configuration-Sample
+ * @sa https://github.com/named-data/ndncert/wiki/Client-Configuration-Sample
*/
class ProfileStorage
{
@@ -177,6 +170,10 @@
void
addCaProfile(const CaProfile& profile);
+ const std::list<CaProfile>&
+ getCaItems() const;
+
+private:
std::list<CaProfile> m_caItems;
};