[Libwebsockets] 1.7.9 with openssl 1.1

Srikar Vadlamani SrikarVadlamani at trafficware.com
Wed Nov 2 16:13:15 CET 2016


I get an warning during compilation of libwebsockets-1.7.9 with openssl-1.1-0b.


cc1: warnings being treated as errors
/home/ target/libwebsockets-1.7.9/lib/ssl.c: In function 'lws_ssl_destroy':
/home/target/libwebsockets-1.7.9/lib/ssl.c:365: warning: 'ERR_remove_thread_state' is deprecated (declared at /home/ target/include/openssl/err.h:246)
/home/ target/libwebsockets-1.7.9/lib/ssl.c: In function 'lws_ssl_context_destroy':
/home/target/libwebsockets-1.7.9/lib/ssl.c:838: warning: 'ERR_remove_thread_state' is deprecated (declared at /home/ target/include/openssl/err.h:246)
make[2]: *** [CMakeFiles/websockets_shared.dir/lib/ssl.c.o] Error 1
make[1]: *** [CMakeFiles/websockets_shared.dir/all] Error 2
make: *** [all] Error 2

Is the below what needs to be done?

#if (OPENSSL_VERSION_NUMBER < 0x10100006L)
#if (OPENSSL_VERSION_NUMBER < 0x01000000) || defined(USE_WOLFSSL)
                ERR_remove_state(0);
#else
#if (OPENSSL_VERSION_NUMBER >= 0x10100005L) && \
                !defined(LIBRESSL_VERSION_NUMBER) && \
                !defined(OPENSSL_IS_BORINGSSL)
                ERR_remove_thread_state();
#else
                ERR_remove_thread_state(NULL);
#endif
#endif
                ERR_free_strings();
                EVP_cleanup();
                CRYPTO_cleanup_all_ex_data();
#endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libwebsockets.org/pipermail/libwebsockets/attachments/20161102/d412a863/attachment.html>


More information about the Libwebsockets mailing list