[Libwebsockets] libwebsockets 3.2.2 + wolfssl 4.3.0 issue

Alessandro Longobardi alessandro.longobardi at vrmedia.it
Fri Mar 20 09:41:24 CET 2020


Hi,
I'm trying to use libwebsockets with wolfssl (instead of openssl) on raspberry pi 0 (as i read wolfssl is more efficient on embedded platform than openssl).
I have  a videostreaming application that works without problem using libwebsockets 3.2.2 with openssl.
I downloaded from the official github repository the release 4.3.0 (https://github.com/wolfSSL/wolfssl/tree/v4.3.0-stable), then i use the following commands in order to compile it:

  1.  ./autogen.sh
  2.  ./configure -enable-opensslextra --enable-libwebsockets (this is a new options in 4.3.0)
  3.  make
  4.  sudo make install
Then on libwebsockets release 3.2.2 i use:

  1.  cmake .. -DLWS_WITH_WOLFSSL=1 -DLWS_WOLFSSL_INCLUDE_DIRS=/usr/local/include/wolfssl -DLWS_WOLFSSL_LIBRARIES=/usr/local/lib/libwolfssl.so -DCMAKE_BUILD_TYPE=DEBUG
  2.  make
  3.  During compilation process it finds some errors:
     *   In lib/tls/openssl/ssl.c it cannot find the declaration of "SSL_get_cipher_bits" and "SSL_get_cipher_version".

                                                    i.     "SSL_get_cipher_bits": I fix it adding #include "/usr/local/include/wolfssl/openssl/ssl.h";  Now it finds declaration of "SSL_get_cipher_bits".

                                                   ii.     "SSL_get_cipher_version": neither in /usr/local/include/wolfssl/openssl/ssl.h can be found, then i just delete the that function call in the log message (lwsl_info, line 42).

  1.  Using that fixes now it compiles successfully.
  2.  Sudo make install

Then i come back to my application, i compile it in order to be linked against the new libwebwosckets.so and libwolfssl.so.
At the beginning, when the application starts connections the following error rises from websockets:

CLIENT_CONNECTION_ERROR: bio_create failed
[2020/03/19 17:58:10:0928] E: lws_ssl_client_bio_create: your tls lib is too old

Do you know possible solutions?


Thanks,
Alessandro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://libwebsockets.org/pipermail/libwebsockets/attachments/20200320/ba1a6d9e/attachment.htm>


More information about the Libwebsockets mailing list