CR fix 3
Change-Id: If6802a52f48870a1fe3c42d57d7797a5f5248b26
diff --git a/src/identity-challenge/challenge-credential.cpp b/src/identity-challenge/challenge-credential.cpp
index 7e72805..a9ebe1c 100644
--- a/src/identity-challenge/challenge-credential.cpp
+++ b/src/identity-challenge/challenge-credential.cpp
@@ -121,13 +121,13 @@
}
// For Client
-std::vector<std::tuple<std::string, std::string>>
+std::multimap<std::string, std::string>
ChallengeCredential::getRequestedParameterList(Status status, const std::string& challengeStatus)
{
- std::vector<std::tuple<std::string, std::string>> result;
+ std::multimap<std::string, std::string> result;
if (status == Status::BEFORE_CHALLENGE) {
- result.push_back(std::make_tuple(PARAMETER_KEY_CREDENTIAL_CERT, "Please provide the certificate issued by a trusted CA."));
- result.push_back(std::make_tuple(PARAMETER_KEY_PROOF_OF_PRIVATE_KEY, "Please sign a Data packet with request ID as the content."));
+ result.emplace(PARAMETER_KEY_CREDENTIAL_CERT, "Please provide the certificate issued by a trusted CA.");
+ result.emplace(PARAMETER_KEY_PROOF_OF_PRIVATE_KEY, "Please sign a Data packet with request ID as the content.");
return result;
}
NDN_THROW(std::runtime_error("Unexpected status or challenge status."));
@@ -135,7 +135,7 @@
Block
ChallengeCredential::genChallengeRequestTLV(Status status, const std::string& challengeStatus,
- std::vector<std::tuple<std::string, std::string>>&& params)
+ std::multimap<std::string, std::string>&& params)
{
Block request(tlv::EncryptedPayload);
if (status == Status::BEFORE_CHALLENGE) {
@@ -170,7 +170,7 @@
}
void
-ChallengeCredential::fulfillParameters(std::vector<std::tuple<std::string, std::string>>& params,
+ChallengeCredential::fulfillParameters(std::multimap<std::string, std::string>& params,
KeyChain& keyChain, const Name& issuedCertName, const RequestId& requestId)
{
auto& pib = keyChain.getPib();