瀏覽代碼

Support BoringSSL

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

+ 12 - 0
src/civetweb.c

@@ -1800,6 +1800,18 @@ typedef struct SSL_CTX SSL_CTX;
 #include "wolfssl_extras.inl"
 #endif
 
+#if defined(OPENSSL_IS_BORINGSSL)
+/* From boringssl/src/include/openssl/mem.h:
+ *
+ * OpenSSL has, historically, had a complex set of malloc debugging options.
+ * However, that was written in a time before Valgrind and ASAN. Since we now
+ * have those tools, the OpenSSL allocation functions are simply macros around
+ * the standard memory functions.
+ *
+ * #define OPENSSL_free free */
+#define free free
+#endif
+
 #if (OPENSSL_VERSION_NUMBER >= 0x10100000L)
 /* If OpenSSL headers are included, automatically select the API version */
 #if !defined(OPENSSL_API_1_1)