瀏覽代碼

Support BoringSSl: disable CONF_modules_unload() and ENGINE_cleanup()

guangqing.chen 5 年之前
父節點
當前提交
dc48da333e
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/civetweb.c

+ 4 - 0
src/civetweb.c

@@ -1810,6 +1810,8 @@ typedef struct SSL_CTX SSL_CTX;
  *
  *
  * #define OPENSSL_free free */
  * #define OPENSSL_free free */
 #define free free
 #define free free
+// disable for boringssl
+#define CONF_modules_unload(a) ((void)0)
 #endif
 #endif
 
 
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
@@ -16420,7 +16422,9 @@ uninitialize_ssl(void)
 		 */
 		 */
 		CRYPTO_set_locking_callback(NULL);
 		CRYPTO_set_locking_callback(NULL);
 		CRYPTO_set_id_callback(NULL);
 		CRYPTO_set_id_callback(NULL);
+#if !defined(OPENSSL_NO_ENGINE)
 		ENGINE_cleanup();
 		ENGINE_cleanup();
+#endif
 		CONF_modules_unload(1);
 		CONF_modules_unload(1);
 		ERR_free_strings();
 		ERR_free_strings();
 		EVP_cleanup();
 		EVP_cleanup();