[Libwebsockets] 1.7.9 with openssl 1.1

Andy Green andy at warmcat.com
Wed Nov 2 22:28:22 CET 2016


On Wed, 2016-11-02 at 15:13 +0000, Srikar Vadlamani wrote:
> 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?

I backported a patch from Peter Penchev to v1.7-stable, can you see if
that helps?

-Andy

> #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
> _______________________________________________
> Libwebsockets mailing list
> Libwebsockets at ml.libwebsockets.org
> http://libwebsockets.org/mailman/listinfo/libwebsockets



More information about the Libwebsockets mailing list