Subject: [PATCH] Initialize openssl during client initialization.
authorMarek Kochanowicz <mako@grapeup.com>
Mon, 13 Oct 2014 05:32:32 +0000 (07:32 +0200)
committerAndy Green <andy.green@linaro.org>
Wed, 22 Oct 2014 07:37:58 +0000 (15:37 +0800)
lib/ssl.c

index ab63239..7bec931 100644 (file)
--- a/lib/ssl.c
+++ b/lib/ssl.c
@@ -249,6 +249,13 @@ int lws_context_init_client_ssl(struct lws_context_creation_info *info,
        if (info->port != CONTEXT_PORT_NO_LISTEN)
                return 0;
 
+       /* basic openssl init */
+
+       SSL_library_init();
+
+       OpenSSL_add_all_algorithms();
+       SSL_load_error_strings();
+
        method = (SSL_METHOD *)SSLv23_client_method();
        if (!method) {
                error = ERR_get_error();