Quellcode durchsuchen

Fix OpenSSL 1.0 compat

Bryan Drewery vor 2 Jahren
Ursprung
Commit
c376831508
1 geänderte Dateien mit 4 neuen und 4 gelöschten Zeilen
  1. 4 4
      src/libssl.cc

+ 4 - 4
src/libssl.cc

@@ -58,13 +58,13 @@ static int load_symbols(void *handle) {
   DLSYM_GLOBAL(handle, SSL_CTX_ctrl);
   DLSYM_GLOBAL(handle, SSL_CTX_set_cipher_list);
   DLSYM_GLOBAL(handle, SSL_CTX_set_tmp_dh_callback);
-#if defined(OPENSSL_API_COMPAT) && OPENSSL_API_COMPAT < 0x10100000L
-  /* For SSL_library_init and SSL_load_error_strings. */
-  DLSYM_GLOBAL(handle, OPENSSL_init_ssl);
-#else
+#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER < 0x10100000L
   DLSYM_GLOBAL_FWDCOMPAT(handle, SSL_library_init);
   DLSYM_GLOBAL_FWDCOMPAT(handle, SSL_load_error_strings);
   /* Some forward-compat is handled in src/compat/openssl.cc. */
+#else
+  /* For SSL_library_init and SSL_load_error_strings. */
+  DLSYM_GLOBAL(handle, OPENSSL_init_ssl);
 #endif
 #if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x10100000L
   DLSYM_GLOBAL(handle, TLS_client_method);