From fce6bde622e62ed92aad7f0bfa7af7e20a1947f0 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 5 Nov 2014 15:35:05 +0800 Subject: [PATCH] ssl CYASSL doesnt have new api Signed-off-by: Andy Green --- lib/ssl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/ssl.c b/lib/ssl.c index 14908d9c..1b8afaf4 100644 --- a/lib/ssl.c +++ b/lib/ssl.c @@ -195,7 +195,11 @@ lws_ssl_destroy(struct libwebsocket_context *context) if (!context->user_supplied_ssl_ctx && context->ssl_client_ctx) SSL_CTX_free(context->ssl_client_ctx); +#ifdef USE_CYASSL + ERR_remove_state(0); +#else ERR_remove_thread_state(NULL); +#endif ERR_free_strings(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); @@ -606,7 +610,11 @@ 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); +#ifdef USE_CYASSL + ERR_remove_state(0); +#else ERR_remove_thread_state(NULL); +#endif ERR_free_strings(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data();