fixed bugs and unittests
diff --git a/src/protocol-detail/challenge.cpp b/src/protocol-detail/challenge.cpp
index 273e631..2923270 100644
--- a/src/protocol-detail/challenge.cpp
+++ b/src/protocol-detail/challenge.cpp
@@ -29,10 +29,10 @@
CHALLENGE::encodeDataPayload(const CertificateRequest& request)
{
Block response = makeEmptyBlock(tlv_encrypted_payload);
- makeNonNegativeIntegerBlock(tlv_status, request.m_status);
- makeStringBlock(tlv_challenge_status, request.m_challengeStatus);
- makeNonNegativeIntegerBlock(tlv_remaining_tries, request.m_remainingTries);
- makeNonNegativeIntegerBlock(tlv_remaining_time, request.m_remainingTime);
+ response.push_back(makeNonNegativeIntegerBlock(tlv_status, request.m_status));
+ response.push_back(makeStringBlock(tlv_challenge_status, request.m_challengeStatus));
+ response.push_back(makeNonNegativeIntegerBlock(tlv_remaining_tries, request.m_remainingTries));
+ response.push_back(makeNonNegativeIntegerBlock(tlv_remaining_time, request.m_remainingTime));
response.encode();
return response;
}