mirror of
https://github.com/electron/electron.git
synced 2026-02-07 05:35:02 -05:00
* chore: bump node in DEPS to v12.16.0 * Fixup asar support setup patch https://github.com/nodejs/node/pull/30862 * Fixup InternalCallbackScope patch https://github.com/nodejs/node/pull/30236 * Fixup GN buildfiles patch https://github.com/nodejs/node/pull/30755 * Fixup low-level hooks patch https://github.com/nodejs/node/pull/30466 * Fixup globals require patch https://github.com/nodejs/node/pull/31643 * Fixup process stream patch https://github.com/nodejs/node/pull/30862 * Fixup js2c modification patch https://github.com/nodejs/node/pull/30755 * Fixup internal fs override patch https://github.com/nodejs/node/pull/30610 * Fixup context-aware warn patch https://github.com/nodejs/node/pull/30336 * Fixup Node.js with ltcg config https://github.com/nodejs/node/pull/29388 * Fixup oaepLabel patch https://github.com/nodejs/node/pull/30917 * Remove redundant ESM test patch https://github.com/nodejs/node/pull/30997 * Remove redundant cli flag patch https://github.com/nodejs/node/pull/30466 * Update filenames.json * Remove macro generation in GN build files https://github.com/nodejs/node/pull/30755 * Fix some compilation errors upstream * Add uvwasi to deps https://github.com/nodejs/node/pull/30258 * Fix BoringSSL incompatibilities * Fixup linked module patch https://github.com/nodejs/node/pull/30274 * Add missing sources to GN uv build https://github.com/libuv/libuv/pull/2347 * Patch some uvwasi incompatibilities * chore: bump Node.js to v12.6.1 * Remove mark_arraybuffer_as_untransferable.patch https://github.com/nodejs/node/pull/30549 * Fix uvwasi build failure on win * Fixup --perf-prof cli option error * Fixup early cjs module loading * fix: initialize diagnostics properly https://github.com/nodejs/node/pull/30025 * Disable new esm syntax specs https://github.com/nodejs/node/pull/30219 * Fixup v8 weakref hook spec https://github.com/nodejs/node/pull/29874 * Fix async context timer issue * Disable monkey-patch-main spec It relies on https://github.com/nodejs/node/pull/29777, and we don't override prepareStackTrace. * Disable new tls specs https://github.com/nodejs/node/pull/23188 We don't support much of TLS owing to schisms between BoringSSL and OpenSSL. Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
34 lines
1.6 KiB
Diff
34 lines
1.6 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
Date: Wed, 12 Feb 2020 15:08:04 -0800
|
|
Subject: fix: use crypto impls for compat
|
|
|
|
BoringSSL does not export DSA_get0_q, ECDSA_SIG_get0_r, or ECDSA_SIG_get0_s. This
|
|
patch works around that problem by using the implementations of those functions as
|
|
found in the OpenSSL repo. I plan to upstream a version of this.
|
|
|
|
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
|
|
index 41b72d010824234c567586524d22cae6ac849edb..b2403821bb3cab4aa4587fcb757eeb101c8a7e03 100644
|
|
--- a/src/node_crypto.cc
|
|
+++ b/src/node_crypto.cc
|
|
@@ -5027,7 +5027,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) {
|
|
if (base_id == EVP_PKEY_DSA) {
|
|
DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
|
|
// Both r and s are computed mod q, so their width is limited by that of q.
|
|
- bits = BN_num_bits(DSA_get0_q(dsa_key));
|
|
+ bits = BN_num_bits(dsa_key->q);
|
|
} else if (base_id == EVP_PKEY_EC) {
|
|
EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
|
|
const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
|
|
@@ -5056,8 +5056,8 @@ static AllocatedBuffer ConvertSignatureToP1363(Environment* env,
|
|
AllocatedBuffer buf = env->AllocateManaged(2 * n);
|
|
unsigned char* data = reinterpret_cast<unsigned char*>(buf.data());
|
|
|
|
- const BIGNUM* r = ECDSA_SIG_get0_r(asn1_sig.get());
|
|
- const BIGNUM* s = ECDSA_SIG_get0_s(asn1_sig.get());
|
|
+ const BIGNUM* r = asn1_sig.get()->r;
|
|
+ const BIGNUM* s = asn1_sig.get()->s;
|
|
CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(r, data, n)));
|
|
CHECK_EQ(n, static_cast<unsigned int>(BN_bn2binpad(s, data + n, n)));
|
|
|