Update amtinfo, usage and admin check. General code cleanup and bug fixes.

This commit is contained in:
Mudit Vats
2020-10-30 09:51:18 -07:00
parent eb42f1e89d
commit 6d2e37e7fc
13 changed files with 434 additions and 148 deletions

View File

@@ -17,15 +17,15 @@
bool get_certificate_hashes(web::json::value& hashes)
{
std::vector<web::json::value> hashValues;
std::vector<std::string> certHashes;
std::vector<cert_hash_entry> certHashes;
if (!cmd_get_certificate_hashes(certHashes))
{
return false;
}
for (std::string hashString : certHashes)
for (cert_hash_entry hashString : certHashes)
{
hashValues.push_back(web::json::value::string(utility::conversions::convertstring(hashString)));
hashValues.push_back(web::json::value::string(utility::conversions::convertstring(hashString.hash)));
}
hashes = web::json::value::array(hashValues);
@@ -269,10 +269,6 @@ bool act_create_request(std::string commands, std::string dns_suffix, std::strin
utility::string_t payload = utility::conversions::to_string_t(encodedPayload);
msg[U("payload")] = web::json::value::string(payload);
#ifdef DEBUG
std::cout << "Activation info payload:" << serializedPayload << std::endl;
#endif
// serialize the entire message
request = utility::conversions::to_utf8string(msg.serialize());