wolfSSL can now be used to replace OpenSSL in WebSocket++!
WebSocket++ is a header only C++ library that implements RFC6455 The WebSocket Protocol. It allows integrating WebSocket client and server functionality into C++ programs and uses interchangeable network transport modules including one based on raw char buffers, one based on C++ iostreams, and one based on Asio (either via Boost or standalone). End users can write additional transport policies to support other networking or event libraries as needed.
Since wolfSSL is compatible with Asio and Boost.Asio (see Asio blog post), it can be used to replace OpenSSL for cryptographic and TLS purposes when building WebSocket++ with Asio or Boost.Asio.
To build WebSocket++, enter the following commands from the root directory of your WebSocket++ download.
$ cmake . $ make $ sudo make install
Now install the wolfSSL compatible versions of Asio or Boost.Asio and build it with wolfSSL (see blog post).
You should now be able to compile and execute programs with WebSocket++ and wolfSSL. Just make sure to link all of the necessary libraries (asio and wolfSSL) and their include paths when compiling.
To run the WebSocket++ unit tests with wolfSSL you will need the wolfSSL modified version of WebSocket++. Please contact firstname.lastname@example.org if you want us to send you the source code.
To run the Ctest tests, execute the following commands from the root directory of the wolfSSL modified WebSocket++ download.
$ cmake -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DWOLFSSL=/path/to/wolfSSL/install . $ ctest .
If you want to run more thorough tests with wolfSSL and WebSocket++ you will need to download and install scons. You should then be able to execute the scons tests with the following commands.
$ export BOOST_ROOT=$WORKSPACE/boost_1_67_0 $ export WOLFSSL_PATH=/path/to/wolfSSL/install $ scons $ scons test
For more information or help with getting WebSocket++ and wolfSSL into your project, please contact us at email@example.com.