Azure IoT C SDK
|
This document is only relevant if you are using the IoT C-SDK on Windows and you wish to use OpenSSL instead of Schannel for your TLS stack.
By default you should use the SDK's default settings for Windows, which is to use Schannel. You should avoid OpenSSL on Windows for the C-SDK because:
This document is kept primarily for archival purposes for customers who may be on OpenSSL/Windows and are not able to change.
OpenSSL binaries that the C-SDK depends on are ssleay32 and libeay32. To enable OpenSSL to be used on Windows, you need to
.\vcpkg install openssl
to obtain the required OpenSSL binaries.C:\vcpkgRoot\vcpkg\packages\openssl_x86-windows
.=
and directory name as cmake's errors are not always obvious. ```Shell set OpenSSLDir=C:\vcpkgRoot\vcpkg\packages\openssl_x86-windows set OPENSSL_ROOT_DIR=C:\vcpkgRoot\vcpkg\packages\openssl_x86-windows ``
Build the SDK to include OpenSSL. The key difference from the typical flow is the inclusion of the
-Duse_openssl:BOOL=ON` option when invoking cmake.
```Shell cd azure-iot-sdk-c mkdir cmake cd cmake cmake -Duse_openssl:BOOL=ON .. cmake –build . – /m /p:Configuration=Release ```
Building samples and your application should be the same as using the default Schannel at this point.