Fix support for OpenSSL < 1.1.0
Fixes
@@ -689,7 +689,11 @@ initialize_ssl_ctx (WSServer * server) {
OpenSSL_add_ssl_algorithms ();
/* ssl context */
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
+ if (!(ctx = SSL_CTX_new (SSLv23_server_method ())))
+#else
if (!(ctx = SSL_CTX_new (TLS_server_method ())))
+#endif
goto out;
/* set certificate */
if (!SSL_CTX_use_certificate_file (ctx, wsconfig.sslcert, SSL_FILETYPE_PEM))
