Fix failure status bug: when status is failure, request should be stopped
Change-Id: I699d9ae6bdc34ac67d9a8b3c69e9d789f9709c6d
diff --git a/src/json-helper.hpp b/src/json-helper.hpp
index 791fc12..4540596 100644
--- a/src/json-helper.hpp
+++ b/src/json-helper.hpp
@@ -32,7 +32,7 @@
const std::string JSON_REQUEST_ID = "request-id";
const std::string JSON_CHALLENGES = "challenges";
const std::string JSON_CHALLENGE_TYPE = "challenge-type";
-const std::string JSON_ERROR_INFO = "error-info";
+const std::string JSON_FAILURE_INFO = "failure-info";
const std::string JSON_CERTIFICATE = "certificate";
/**
@@ -100,12 +100,15 @@
*
* Target JSON format:
* {
- * "status": "error",
- * "error-info": "@p errorInfo"
+ * "request-id": "@p requestId",
+ * "challenge-type": "@p challengeType",
+ * "status": "failure",
+ * "failure-info": "@p errorInfo",
* }
*/
const JsonSection
-genErrorJson(const std::string& errorInfo);
+genFailureJson(const std::string& requestId, const std::string& challengeType,
+ const std::string& status, const std::string& failureInfo);
} // namespace ndncert
} // namespace ndn