apply Error Data packet in challenge status
Change-Id: I629e57ad96d33ad77dcc939a25577a15afcf2886
diff --git a/src/challenge-module/challenge-credential.cpp b/src/challenge-module/challenge-credential.cpp
index fe120eb..1486c30 100644
--- a/src/challenge-module/challenge-credential.cpp
+++ b/src/challenge-module/challenge-credential.cpp
@@ -76,7 +76,7 @@
}
// For CA
-std::tuple<Error, std::string>
+std::tuple<ErrorCode, std::string>
ChallengeCredential::handleChallengeRequest(const Block& params, CertificateRequest& request)
{
params.parse();
@@ -92,7 +92,7 @@
credential = io::load<security::v2::Certificate>(ss);
if (credential == nullptr) {
_LOG_ERROR("Cannot load challenge parameter: credential");
- return returnWithError(request, Error::INVALID_PARAMETER, "Cannot challenge credential: credential.");
+ return returnWithError(request, ErrorCode::INVALID_PARAMETER, "Cannot challenge credential: credential.");
}
}
else if (readString(elements[i]) == PARAMETER_KEY_PROOF_OF_PRIVATE_KEY) {
@@ -100,7 +100,7 @@
selfSigned = io::load<security::v2::Certificate>(ss);
if (selfSigned == nullptr) {
_LOG_ERROR("Cannot load challenge parameter: proof of private key");
- return returnWithError(request, Error::INVALID_PARAMETER, "Cannot load challenge parameter: proof of private key.");
+ return returnWithError(request, ErrorCode::INVALID_PARAMETER, "Cannot load challenge parameter: proof of private key.");
}
}
else {
@@ -122,7 +122,7 @@
}
_LOG_TRACE("Cannot verify the proof of private key against credential");
- return returnWithError(request, Error::INVALID_PARAMETER, "Cannot verify the proof of private key against credential.");
+ return returnWithError(request, ErrorCode::INVALID_PARAMETER, "Cannot verify the proof of private key against credential.");
}
// For Client