Skip to content

Commit

Permalink
logs in identity client
Browse files Browse the repository at this point in the history
  • Loading branch information
xiazhvera committed Jul 1, 2024
1 parent d1e0573 commit 7214f0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions identity/source/IotIdentityClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,20 @@ namespace Aws
auto onSubscribePublish =
[handler](
Aws::Crt::Mqtt::MqttConnection &, const Aws::Crt::String &, const Aws::Crt::ByteBuf &payload) {
AWS_LOGF_DEBUG(
AWS_LS_MQTT_CLIENT,
"TODO: Check the received raw payload onSubscribeCreateKeysAndCertificate: %s",
payload.buffer);
Aws::Crt::String objectStr(reinterpret_cast<char *>(payload.buffer), payload.len);
Aws::Crt::JsonObject jsonObject(objectStr);
Aws::Iotidentity::CreateKeysAndCertificateResponse response(jsonObject);
AWS_LOGF_DEBUG(
AWS_LS_MQTT_CLIENT,
"TODO: Check the contributed response: \n CertificateOwnershipToken : %s \n Certificates : %s "
"\n Key: %s \n",
response.CertificateOwnershipToken->c_str(),
response.CertificatePem->c_str(),
response.PrivateKey->c_str());
handler(&response, AWS_ERROR_SUCCESS);
};

Expand Down

0 comments on commit 7214f0e

Please sign in to comment.