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 e342a39e8d4a8d178baf90bfe0b355d08b51f776..a820b342e553d58b1967c0deefdf1b6ae333babd 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -56,6 +56,21 @@ config("no_asm_config") {
 all_sources = crypto_sources + ssl_sources + pki_sources + pki_internal_headers
 all_headers = crypto_headers + ssl_headers + pki_internal_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/blowfish/blowfish.c",
+    "src/decrepit/cfb/cfb.c",
+    "src/decrepit/ripemd/internal.h",
+    "src/decrepit/ripemd/ripemd.c",
+  ]
+}
+
 if (enable_rust_boringssl) {
   rust_bindgen("raw_bssl_sys_bindings") {
     header = "src/rust/bssl-sys/wrapper.h"
