File curl_init.patch of Package openwsman.16287

Index: openwsman-2.4.11/src/server/wsmand-listener.c
===================================================================
--- openwsman-2.4.11.orig/src/server/wsmand-listener.c
+++ openwsman-2.4.11/src/server/wsmand-listener.c
@@ -85,6 +85,12 @@
 
 /* SSL thread safe */
 #include <openssl/crypto.h>
+
+// only for fake init of curl ... because sblim-sfcc uses curl and then removes it and libcurl assumes that nothing else uses libssl
+// so we init curl here and hold it for duration of program execution. workaround for bsc#1157655
+#include <curl/curl.h>
+
+
 static pthread_mutex_t *lock_cs;
 static long *lock_count;
 
@@ -774,6 +780,7 @@ WsManListenerH *wsmand_start_server(dict
 
 	/* SSL thread safe */
 	thread_setup();
+    curl_global_init(CURL_GLOBAL_SSL);
 
 	pthread_create(&tid, &pattrs, wsman_server_auxiliary_loop_thread, cntx);
 
@@ -802,6 +809,7 @@ WsManListenerH *wsmand_start_server(dict
                 shttpd_add_socket(thread->ctx, sock, use_ssl);
         }
 
+    curl_global_cleanup();
 	/* SSL thread safe */
 	thread_cleanup();
 
openSUSE Build Service is sponsored by