Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mqtt5 Device Defender Support #646

Merged
merged 16 commits into from
Oct 26, 2023
Merged

Mqtt5 Device Defender Support #646

merged 16 commits into from
Oct 26, 2023

Conversation

xiazhvera
Copy link
Contributor

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@xiazhvera xiazhvera marked this pull request as ready for review October 19, 2023 16:21
const Crt::String &thingName)
: ReportTaskBuilder(
allocator,
Crt::Mqtt::MqttConnection::NewConnectionFromMqtt5Client(mqtt5Client),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: mqtt5Client can be moved here:

Suggested change
Crt::Mqtt::MqttConnection::NewConnectionFromMqtt5Client(mqtt5Client),
Crt::Mqtt::MqttConnection::NewConnectionFromMqtt5Client(std::move(mqtt5Client)),

static int s_TestMqtt5DeviceDefenderResourceSafety(Aws::Crt::Allocator *allocator, void *ctx)
{
(void)ctx;
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: This new scope contains the whole function body. Is it really required here?

static int s_TestMqtt5DeviceDefenderFailedTest(Aws::Crt::Allocator *allocator, void *ctx)
{
(void)ctx;
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Another new scope containing the whole body

To run the Device Defender sample, use the following command:

``` sh
./basic-report --endpoint <endpoint> --cert <path to the certificate> --key <path to the private key> --thing_name <thing name> --ca_file <path to root CA>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary should be mqtt5-basic-report

You can also pass a Certificate Authority file (CA) if your certificate and key combination requires it:

``` sh
./basic-report --endpoint <endpoint> --cert <path to the certificate> --key <path to the private key> --thing_name <thing name> --ca_file <path to root CA>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The binary should be mqtt5-basic-report

@xiazhvera xiazhvera merged commit 649361f into main Oct 26, 2023
36 checks passed
@xiazhvera xiazhvera deleted the mqtt5_dd branch October 26, 2023 15:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants