aws / aws-iot-device-sdk-embedded-C

SDK for connecting to AWS IoT from a device using embedded C.
MIT License
978 stars 625 forks source link

Replace mbedTLS with OpenSSL in fleet provision demo #1797

Closed lcycoding closed 2 years ago

lcycoding commented 2 years ago

Dear AWS developers,

I was developing with fleet provision demo recently, and noticed that the connection library using mbedTLS. Wondering if mbedTLS could be replaced by OpenSSL like the other demo? If so, how do we adapt the cmake config or is there any recommendation steps that we could do?

Best,

archigup commented 2 years ago

In the fleet provisioning demo, mqtt_operations.c would have to be updated to use OpenSSL instead of mbedTLS. This can be done by following code in other demos using OpenSSL. The CMake would also have to add the OpenSSL dependency. If these are done, the demo will use OpenSSL for connecting.

However, it will still require mbedtls as well. The demo uses corePKCS11 for credential storage, and corePKCS11 requires mbedtls for crypto operations. Additionally pkcs11_operatiosn.c in the demo uses mbedTLS for crypo operations as well.