when you want to change the TLS level in the SDK and In order to set up TLS encryption with devices for device SDK.
->By calling PreferMethodHandle with the relevant TLS type parameter, you can set up the TLS level setting while you are using Secure Communication between BioStar 2 Device SDK and Suprema device’s network connection.
Declaration
int BS2_SetSSLHandler(void* context, PreferMethod ptrPreferMethod, GetRootCaFilePath ptrGetRootCaFilePath, GetServerCaFilePath ptrGetServerCaFilePath, GetServerPrivateKeyFilePath ptrGetServerPrivateKeyFilePath, GetPassword ptrGetPassword, OnErrorOccured ptrOnErrorOccured);
How to set it up:
BS2_SetSSLHandler
Before setting the TLS 1.2, you have to check the function below. the PreferMethod includes all of the settings about TLS.
UInt32 PreferMethodHandle(UInt32 deviceID)
{ return (UInt32)(BS2SslMethodMaskEnum.TLS1 | BS2SslMethodMaskEnum.TLS1_1 |BS2SslMethodMaskEnum.TLS1_2);
}