Hi @Madanala, Jayashree Greetings! Thank you for posting the question here. I have looked into the source code of the Azure IoT SDK Device Client 2.1.3 version. You can download the source code for this version of the SDK from the Assets
section of the above shared link. I have a found reference of SSL_CONTEXT_PROTOCOL="TLSv1.2"
being used in the file \azure-iot-sdk-java-2022-12-12\device\iot-device-client\src\main\java\com\microsoft\azure\sdk\iot\device\auth\IotHubSSLContext.java
Based on this finding, I would say the device client SDK version 2.1.3 is using TLS version 1.2
Even though the TLS used in SDK is at a higher version than what is set at the IoT Hub, there should not be any issues with the connectivity.
What is the way/process to know what tls version is used to connect from device to iothub.
There is a method defined under the same file with name getSSLContext
which will return the SSL context used by the SDK. Please find the line of code from the latest version of the SDK client on the GitHub repository for reference.
Please note that the default value for this is set to "TLSv1.2". However, the file configure_tls_protocol_version_and_ciphers.md states that the version used by the SDK can be modified by changing the property as follows: $ java -Djdk.tls.client.protocols="TLSv1.2" yourApp
. This property was introduced to JDK7 7u95 and to JDK6 6u121.
Hope this answers your question. Please let us know if you have any follow up questions or need further clarification.
If the response helped, please do click Accept Answer and Yes for the answer provided. Doing so would help other community members with similar issue identify the solution. I highly appreciate your contribution to the community.