From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 20 Sep 2018 17:48:05 -0700
Subject: boringssl BUILD.gn

Build BoringSSL with some extra functions that nodejs needs.

diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index d31a9f29fa9c12e753708b2a1e75c33b70924300..12c0a84a39f4707f0120922aa64c813e5b2a7b0c 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -46,6 +46,19 @@ config("no_asm_config") {
 
 all_sources = crypto_sources + ssl_sources
 all_headers = crypto_headers + ssl_headers
+if (is_electron_build) {
+  # Needed to build a nodejs-compatible boringssl.
+  all_sources += [
+    "src/decrepit/evp/evp_do_all.c",
+    "src/decrepit/xts/xts.c",
+  ]
+
+  all_sources += [
+    "src/decrepit/ripemd/internal.h",
+    "src/decrepit/ripemd/ripemd.c",
+    "src/decrepit/cfb/cfb.c",
+  ]
+}
 
 # Windows' assembly is built with Yasm. The other platforms use the platform
 # assembler.
