R
Rupesh Pilania
Guest
Hi Team,
I am facing the below issue while using winsock api to create secure socket on WinCE2013.
1. I have created dlls for winsock api and enabled the TLS 1.0 Below given is the code snippet.
protocolsToUse.dwCount = 1;
protocolsToUse.ProtocolList[0].dwFlags = 0;
protocolsToUse.ProtocolList[0].dwProtocol = SSL_PROTOCOL_TLS1;
protocolsToUse.ProtocolList[0].dwVersion = 0;
if (WSAIoctl(s, SO_SSL_SET_PROTOCOLS,
(LPVOID)&protocolsToUse, sizeof(protocolsToUse),
NULL, 0, NULL, NULL, NULL) == SOCKET_ERROR)
{
goto SSLInit_Error;
It works for TLS 1.0 but I am not able to see any option to use TLS 1.1 or TLS 1.2 in winsock headers.
2. I am importing these dlls in c# application for .net cf 3.9. The c# application is mqtt multithreaded library. It works fine if I disable ssl option for winsock api. It throws socket error 10036 for TLS 1.0. There are two threads one sends the messages using winsock send function and other receives the messages using winsock recv function.
3. If I put two seconds sleep in the receiving thread then it works fine for TLS 1.0 also and doesn't throw 10036 error. I have tested TLS 1.0 communication on wireshark and mqtt broker.
4. If I am not using ssl init and using the sockets for normal mqtt communication then it works fine without any sleep in receiving thread.
I have no idea why the same design behaving differently for ssl and non ssl sockets.
Thankyou
Continue reading...
I am facing the below issue while using winsock api to create secure socket on WinCE2013.
1. I have created dlls for winsock api and enabled the TLS 1.0 Below given is the code snippet.
protocolsToUse.dwCount = 1;
protocolsToUse.ProtocolList[0].dwFlags = 0;
protocolsToUse.ProtocolList[0].dwProtocol = SSL_PROTOCOL_TLS1;
protocolsToUse.ProtocolList[0].dwVersion = 0;
if (WSAIoctl(s, SO_SSL_SET_PROTOCOLS,
(LPVOID)&protocolsToUse, sizeof(protocolsToUse),
NULL, 0, NULL, NULL, NULL) == SOCKET_ERROR)
{
goto SSLInit_Error;
It works for TLS 1.0 but I am not able to see any option to use TLS 1.1 or TLS 1.2 in winsock headers.
2. I am importing these dlls in c# application for .net cf 3.9. The c# application is mqtt multithreaded library. It works fine if I disable ssl option for winsock api. It throws socket error 10036 for TLS 1.0. There are two threads one sends the messages using winsock send function and other receives the messages using winsock recv function.
3. If I put two seconds sleep in the receiving thread then it works fine for TLS 1.0 also and doesn't throw 10036 error. I have tested TLS 1.0 communication on wireshark and mqtt broker.
4. If I am not using ssl init and using the sockets for normal mqtt communication then it works fine without any sleep in receiving thread.
I have no idea why the same design behaving differently for ssl and non ssl sockets.
Thankyou
Continue reading...