ca+tools: configurable ca forwarding hint and ca-server interface improvement
Change-Id: I95cc6b2fb195f7c3625f14a4f8856abcf65022d9
diff --git a/src/detail/ca-profile.cpp b/src/detail/ca-profile.cpp
index 86d5be4..06dec71 100644
--- a/src/detail/ca-profile.cpp
+++ b/src/detail/ca-profile.cpp
@@ -35,6 +35,11 @@
if (profile.caPrefix.empty()) {
NDN_THROW(std::runtime_error("Cannot parse ca-prefix from the config file"));
}
+ // Forwarding hint
+ profile.forwardingHint = Name(json.get(CONFIG_FORWARDING_HINT, ""));
+ if (profile.forwardingHint.empty()) {
+ profile.forwardingHint = Name(profile.caPrefix).append("CA");
+ }
// CA info
profile.caInfo = json.get(CONFIG_CA_INFO, "");
// CA max validity period