How do I associate a certificate with an IoT Edge SDK connection on iOS & Android

Philip 0 Reputation points
2023-02-01T09:37:17.24+00:00

I am trying to connect to an IoT Edge device from iOS and Android apps. It looks like the SDK relies on using the local device certificate store to enable the handshake/authentication for connecting to MQTT.

I have this working on Windows using a local store but don't know how to programmatically add certificates to a store on Android or iOS, or present a cert to bypass the need to instal locally.

Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
543 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AshokPeddakotla-MSFT 27,966 Reputation points
    2023-03-01T12:40:10.3+00:00

    Philip If you are still looking for suggestions, please see below.

    All the documentation I can find registers the certificate in the device certificate store. Is there a sample where I can present a certificate directly to the SDK in code, or is there another way to do it?

    Did you check the documentation on connecting to an IoT Edge device in the following article: Connect a downstream device to an Azure IoT Edge gateway?

    The Azure IoT Edge SDK provides an option to register a CA certificate when setting up the client.

    This operation doesn't install the certificate anywhere, but rather uses a string format of the certificate in memory. The saved certificate is provided to the underlying TLS stack when establishing a connection. Please see Use certificates with Azure IoT SDKs

    The documentation also provides steps for different languages on how to use certificates with Azure IoT SDKs.

    Hope this helps.

    If you need further help in this matter, please comment in the below section and we are happy to discuss!


    If this answers your query, do click Accept Answer and Yes for this answer as helpful. And, if you have any further query do let us know by commenting in the below section.

    0 comments No comments