Built mqtt_mutual_auth demo without an issue. Executed demo successfully.
Commands to build
cmake -S . -B build -DAWS_IOT_ENDPOINT="myendpoint-ats.iot.us-east-1.amazonaws.com" -DCLIENT_CERT_PATH="/home/kstribrn/cool-certificate.pem.crt" -DCLIENT_PRIVATE_KEY_PATH="/home/kstribrn/my-privatekey.pem.key"
cd build
make mqtt_demo_mutual_auth
cd bin
./mqtt_demo_mutual_auth
Output
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:680] Establishing a TLS session to myendpoint-ats.iot.us-east-1.amazonaws.com:8883.
[INFO] [MQTT] [core_mqtt.c:2740] MQTT connection established with the broker.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1173] MQTT connection successfully established with broker.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1683] A clean MQTT connection is established. Cleaning up all the stored outgoing publishes.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1418] Subscribing to the MQTT topic testclient/example/topic.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1237] SUBSCRIBE sent for topic testclient/example/topic to broker.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1051] Subscribed to the topic testclient/example/topic. with maximum QoS 1.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1457] Sending Publish to the MQTT topic testclient/example/topic.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1335] PUBLISH sent for topic testclient/example/topic to broker with packet ID 2.
[INFO] [MQTT] [core_mqtt.c:1540] Ack packet deserialized with result: MQTTSuccess.
[INFO] [MQTT] [core_mqtt.c:1557] State record updated. New state=MQTTPublishDone.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:1082] PUBACK received for packet id 2.
[INFO] [DEMO] [mqtt_demo_mutual_auth.c:792] Cleaned up outgoing publish packet with packet id 2.
...
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
Description of changes
Remove duplicate and unnecessary CMake line. Update README to add notice that default Root CA path is relative to binary execution directory.
Issue
https://github.com/aws/aws-iot-device-sdk-embedded-C/issues/1880
Testing
Built mqtt_mutual_auth demo without an issue. Executed demo successfully.
Commands to build
Output
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.