openssl update deprecated remove_state api
authorAndy Green <andy.green@linaro.org>
Mon, 27 Oct 2014 03:38:03 +0000 (11:38 +0800)
committerAndy Green <andy.green@linaro.org>
Mon, 27 Oct 2014 03:38:03 +0000 (11:38 +0800)
As suggested by svetlin-mladenov here

https://github.com/warmcat/libwebsockets/issues/186

Signed-off-by: Andy Green <andy.green@linaro.org>
lib/ssl.c

index b37f1bb..2ac784d 100644 (file)
--- a/lib/ssl.c
+++ b/lib/ssl.c
@@ -195,7 +195,7 @@ lws_ssl_destroy(struct libwebsocket_context *context)
        if (!context->user_supplied_ssl_ctx && context->ssl_client_ctx)
                SSL_CTX_free(context->ssl_client_ctx);
 
-       ERR_remove_state(0);
+       ERR_remove_thread_state(NULL);
        ERR_free_strings();
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();
@@ -613,7 +613,7 @@ lws_ssl_context_destroy(struct libwebsocket_context *context)
        if (!context->user_supplied_ssl_ctx && context->ssl_client_ctx)
                SSL_CTX_free(context->ssl_client_ctx);
 
-       ERR_remove_state(0);
+       ERR_remove_thread_state(NULL);
        ERR_free_strings();
        EVP_cleanup();
        CRYPTO_cleanup_all_ex_data();