Browse - Programming Tips - How can I do a SSL / TLS connection in my win32 application?
Keywords: intro, introduction
Q. How can I do a SSL / TLS connection in my win32 application?
A. There are two ways.
Use WinInet like this:
HINTERNET m_hInternet = InternetOpen(szId, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
HINTERNET m_hConnection = InternetConnect(
But it only works for http and ftp (and gopher).
Or you can use Microsoft SecureChannel.
Your code will begin:
This uses regular winsock2 sockets and you call some (complicated) functions to upgrade the connection to secure. So this is more low-level than the method above.
There are other non-Microsoft libraries like curl and openssl.