Just adding this define won’t work, the library has to be compiled with this define. I’m trying to do this but I have problem with correct linking (unresolved external symbols). Anyway, wouldn’t be nice to have it enabled by default?
Yes the library was built without SSL suppport. If you need SSL Support you could just build it again. The use case right now ( Cook on the fly ) didn’t warrant SSL support. But when we get to networking for HTML5, maybe.
Ok, I figured out how to properly build this library with SSL support and it works. But still it would be brilliant if SSL in websockets and http was out of the box.
I am glad to hear that you were able to get this working for you. Would you be able to post an answer explaining what you did in case anyone else needs help with this same issue?
Now with good OpenSSL static libraries it’s time to build libwebsockets. First we need visual studio solution, CMake is a tool that can generate it. In command prompt go to the directory where your libwebsockets sources are and type:
mkdir Build
cd Build
cmake .. -G "Visual Studio 12" -DOPENSSL_ROOT_DIR="C:\OpenSSL\Build"
Where “C:\OpenSSL\Build” is a place where is your OpenSSL build from previous step.
Now in Build directory in libwebsockets sources directory there is libwebsockets.sln, run it.
You can remove all projects except ZLIB and websockets from the solution. Also remove CMakeLists.txt from this projects so CMake will not generate the whole solution again.
Now change Debug Win32 to Release x64 and build the solution. (LWS_OPENSSL_SUPPORT is set on be default).
The only thing left is to put newly built libs and headers from OpenSSL and libwebsockets to proper directories in ThirdParty and everything should work like a charm.
For me now the only thing left is to build libraries for iOS and Android but it will be another story.