mirror of
https://github.com/electron/electron.git
synced 2026-01-09 15:38:08 -05:00
* chore: bump chromium in DEPS to 136.0.7076.0 * chore: bump chromium in DEPS to 136.0.7077.0 * 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | https://chromium-review.googlesource.com/c/chromium/src/+/6368856 * 6356528: Clean up LegacyRenderWidgetHostHWND code | https://chromium-review.googlesource.com/c/chromium/src/+/6356528 * chore: export patches * 6339113: [Viewport Segments] Add CDP commands to override Viewport Segments without overriding other device properties. | https://chromium-review.googlesource.com/c/chromium/src/+/6339113 * 6352169: [DevTools][MultiInstance] Support new tab in another window on Android | https://chromium-review.googlesource.com/c/chromium/src/+/6352169 * 6368856: Migrate absl variant.h and utility.h in content (part 2/2) | https://chromium-review.googlesource.com/c/chromium/src/+/6368856 * 6360858:Clickiness: Wire response from URLLoader to DB, add e2e tests| https://chromium-review.googlesource.com/c/chromium/src/+/6360858 * chore: bump chromium in DEPS to 136.0.7079.0 * chore: export patches * chore: bump chromium in DEPS to 136.0.7081.0 * chore: export patches * chore: bump chromium in DEPS to 136.0.7083.0 * 6361987: Remove double-declaration with gfx::NativeView and gfx::NativeWindow | https://chromium-review.googlesource.com/c/chromium/src/+/6361987 * chore: export patches * chore: bump chromium in DEPS to 136.0.7087.0 * chore: export patches * fix: include node patch for missing AtomicsWaitEvent https://chromium-review.googlesource.com/c/chromium/src/+/6385540 * build: add depot_tools python to path * fix: cppgc init and unregistering v8 isolate https://chromium-review.googlesource.com/c/v8/v8/+/6333562 CppGc is now initialized earlier so Node can skip reinitializing it. Additionally, gin::IsolateHandle was attempting to destruct an already destructed v8::Isolate upon electron::JavaScriptEnvironment destruction. By removing the call to NodePlatform::UnregisterIsolate, this fixes the crash on app shutdown. * fix: unregister isolate after destruction See code comment. * chore: bump chromium in DEPS to 136.0.7095.0 * chore: sync patches * fix: add script_parsing::ContentScriptType parameter https://chromium-review.googlesource.com/c/chromium/src/+/6298395 * fix: migrate content::BrowserAccessibilityState methods https://chromium-review.googlesource.com/c/chromium/src/+/6401437 https://chromium-review.googlesource.com/c/chromium/src/+/6383275 * feat: enableHappyEyeballs option for host resolver https://chromium-review.googlesource.com/c/chromium/src/+/6332599 * fix: add new cookie exclusion reason https://chromium-review.googlesource.com/c/chromium/src/+/6343479 * fix: add new url loader method https://chromium-review.googlesource.com/c/chromium/src/+/6337340 * fix: add new cppgc header file for electron_node headers https://chromium-review.googlesource.com/c/v8/v8/+/6348644 * fix: disable CREL on Linux ARM64 https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9 * fixup! fix: add new cppgc header file for electron_node headers https://chromium-review.googlesource.com/c/v8/v8/+/6348644 * chore: update corner smoothing patch * fixup! chore: update corner smoothing patch * chore: disable NAN weak tests These two tests are incompatible with a V8 change that disallows running JS code from a weak finalizer callback. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/4733273 * test: fix task starvation in node test A V8 change makes these contexts get collected in a task that is posted and run asynchronously. The tests were synchronously GC'ing in an infinite loop, preventing the task loop from running the task that would GC these contexts. This change should be upstreamed in some way. Ref: https://chromium-review.googlesource.com/c/v8/v8/+/4733273 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: alice <alice@makenotion.com> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org> Co-authored-by: clavin <clavin@electronjs.org>
132 lines
6.3 KiB
Diff
132 lines
6.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Shelley Vohr <shelley.vohr@gmail.com>
|
|
Date: Wed, 31 May 2023 11:36:48 +0200
|
|
Subject: feat: expose several extra cipher functions
|
|
|
|
This patch exposes the following ciphers:
|
|
|
|
AES_CFB Ciphers: aes-128-cfb, aes-256-cfb
|
|
|
|
Implementations for these ciphers exist but aren't exposed, so they're
|
|
unusable without this patch. We should upstream this as similar
|
|
patches for implemented cipher functions have been accepted.
|
|
|
|
Blowfish Ciphers: bf-cbc, bf-cfb, bf-ecb
|
|
|
|
The addition of Blowfish ciphers adds references decrepit code
|
|
from non-decrepit code, so upstream is unlikely to take the patch.
|
|
|
|
DES Ciphers: des-ede3
|
|
|
|
An implementation for this cipher exists but isn't exposed, so it's
|
|
unusable without this patch. Akin to the AES_CFB exposures, we should
|
|
upstream this as similar patches for implemented cipher functions have
|
|
been accepted.
|
|
|
|
RC2 Ciphers: rc2-40-cbc
|
|
|
|
It's unclear whether this would be accepted upstream. We should try regardless.
|
|
|
|
diff --git a/crypto/cipher/get_cipher.cc b/crypto/cipher/get_cipher.cc
|
|
index 2622dc78d1da236862312f55bc0a40f26116486e..ac7aff6518ad5c2a0e48bd91d60a1f825851b634 100644
|
|
--- a/crypto/cipher/get_cipher.cc
|
|
+++ b/crypto/cipher/get_cipher.cc
|
|
@@ -31,6 +31,7 @@ static const struct {
|
|
const EVP_CIPHER *(*func)(void);
|
|
} kCiphers[] = {
|
|
{NID_aes_128_cbc, "aes-128-cbc", EVP_aes_128_cbc},
|
|
+ {NID_aes_128_cfb128, "aes-128-cfb", EVP_aes_128_cfb128},
|
|
{NID_aes_128_ctr, "aes-128-ctr", EVP_aes_128_ctr},
|
|
{NID_aes_128_ecb, "aes-128-ecb", EVP_aes_128_ecb},
|
|
{NID_aes_128_gcm, "aes-128-gcm", EVP_aes_128_gcm},
|
|
@@ -41,17 +42,23 @@ static const struct {
|
|
{NID_aes_192_gcm, "aes-192-gcm", EVP_aes_192_gcm},
|
|
{NID_aes_192_ofb128, "aes-192-ofb", EVP_aes_192_ofb},
|
|
{NID_aes_256_cbc, "aes-256-cbc", EVP_aes_256_cbc},
|
|
+ {NID_aes_256_cfb128, "aes-256-cfb", EVP_aes_256_cfb128},
|
|
{NID_aes_256_ctr, "aes-256-ctr", EVP_aes_256_ctr},
|
|
{NID_aes_256_ecb, "aes-256-ecb", EVP_aes_256_ecb},
|
|
{NID_aes_256_gcm, "aes-256-gcm", EVP_aes_256_gcm},
|
|
{NID_aes_256_ofb128, "aes-256-ofb", EVP_aes_256_ofb},
|
|
+ {NID_bf_cbc, "bf-cbc", EVP_bf_cbc},
|
|
+ {NID_bf_cfb64, "bf-cfb", EVP_bf_cfb},
|
|
+ {NID_bf_ecb, "bf-ecb", EVP_bf_ecb},
|
|
{NID_des_cbc, "des-cbc", EVP_des_cbc},
|
|
{NID_des_ecb, "des-ecb", EVP_des_ecb},
|
|
{NID_des_ede_cbc, "des-ede-cbc", EVP_des_ede_cbc},
|
|
{NID_des_ede_ecb, "des-ede", EVP_des_ede},
|
|
+ {NID_des_ede3_ecb, "des-ede3", EVP_des_ede3},
|
|
{NID_des_ede3_cbc, "des-ede3-cbc", EVP_des_ede3_cbc},
|
|
{NID_rc2_cbc, "rc2-cbc", EVP_rc2_cbc},
|
|
{NID_rc4, "rc4", EVP_rc4},
|
|
+ {NID_rc2_40_cbc, "rc2-40-cbc", EVP_rc2_40_cbc}
|
|
};
|
|
|
|
const EVP_CIPHER *EVP_get_cipherbynid(int nid) {
|
|
diff --git a/decrepit/evp/evp_do_all.cc b/decrepit/evp/evp_do_all.cc
|
|
index 8fdf1c624794f568bfc77b7b6b0c510b23905a4d..2e40c031e8c681fe921331b26dbf63f4df2fcf71 100644
|
|
--- a/decrepit/evp/evp_do_all.cc
|
|
+++ b/decrepit/evp/evp_do_all.cc
|
|
@@ -20,8 +20,10 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
|
const char *unused, void *arg),
|
|
void *arg) {
|
|
callback(EVP_aes_128_cbc(), "AES-128-CBC", NULL, arg);
|
|
+ callback(EVP_aes_128_cfb128(), "AES-128-CFB", NULL, arg);
|
|
callback(EVP_aes_192_cbc(), "AES-192-CBC", NULL, arg);
|
|
callback(EVP_aes_256_cbc(), "AES-256-CBC", NULL, arg);
|
|
+ callback(EVP_aes_256_cfb128(), "AES-256-CFB", NULL, arg);
|
|
callback(EVP_aes_128_ctr(), "AES-128-CTR", NULL, arg);
|
|
callback(EVP_aes_192_ctr(), "AES-192-CTR", NULL, arg);
|
|
callback(EVP_aes_256_ctr(), "AES-256-CTR", NULL, arg);
|
|
@@ -34,9 +36,13 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
|
callback(EVP_aes_128_gcm(), "AES-128-GCM", NULL, arg);
|
|
callback(EVP_aes_192_gcm(), "AES-192-GCM", NULL, arg);
|
|
callback(EVP_aes_256_gcm(), "AES-256-GCM", NULL, arg);
|
|
+ callback(EVP_bf_cbc(), "BF-CBC", NULL, arg);
|
|
+ callback(EVP_bf_cfb(), "BF-CFB", NULL, arg);
|
|
+ callback(EVP_bf_ecb(), "BF-ECB", NULL, arg);
|
|
callback(EVP_des_cbc(), "DES-CBC", NULL, arg);
|
|
callback(EVP_des_ecb(), "DES-ECB", NULL, arg);
|
|
callback(EVP_des_ede(), "DES-EDE", NULL, arg);
|
|
+ callback(EVP_des_ede3(), "DES-EDE3", NULL, arg);
|
|
callback(EVP_des_ede_cbc(), "DES-EDE-CBC", NULL, arg);
|
|
callback(EVP_des_ede3_cbc(), "DES-EDE3-CBC", NULL, arg);
|
|
callback(EVP_rc2_cbc(), "RC2-CBC", NULL, arg);
|
|
@@ -44,8 +50,10 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
|
|
|
// OpenSSL returns everything twice, the second time in lower case.
|
|
callback(EVP_aes_128_cbc(), "aes-128-cbc", NULL, arg);
|
|
+ callback(EVP_aes_128_cfb128(), "aes-128-cfb", NULL, arg);
|
|
callback(EVP_aes_192_cbc(), "aes-192-cbc", NULL, arg);
|
|
callback(EVP_aes_256_cbc(), "aes-256-cbc", NULL, arg);
|
|
+ callback(EVP_aes_256_cfb128(), "aes-256-cfb", NULL, arg);
|
|
callback(EVP_aes_128_ctr(), "aes-128-ctr", NULL, arg);
|
|
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
|
|
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
|
|
@@ -58,9 +66,13 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
|
callback(EVP_aes_128_gcm(), "aes-128-gcm", NULL, arg);
|
|
callback(EVP_aes_192_gcm(), "aes-192-gcm", NULL, arg);
|
|
callback(EVP_aes_256_gcm(), "aes-256-gcm", NULL, arg);
|
|
+ callback(EVP_bf_cbc(), "bf-cbc", NULL, arg);
|
|
+ callback(EVP_bf_cfb(), "bf-cfb", NULL, arg);
|
|
+ callback(EVP_bf_ecb(), "bf-ecb", NULL, arg);
|
|
callback(EVP_des_cbc(), "des-cbc", NULL, arg);
|
|
callback(EVP_des_ecb(), "des-ecb", NULL, arg);
|
|
callback(EVP_des_ede(), "des-ede", NULL, arg);
|
|
+ callback(EVP_des_ede3(), "des-ede3", NULL, arg);
|
|
callback(EVP_des_ede_cbc(), "des-ede-cbc", NULL, arg);
|
|
callback(EVP_des_ede3_cbc(), "des-ede3-cbc", NULL, arg);
|
|
callback(EVP_rc2_cbc(), "rc2-cbc", NULL, arg);
|
|
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
|
|
index 13e68ad20ac08a462bb577d7f99e2c6f167579fa..4960d0eeb8f31bec4347ed2a1b63beba530de700 100644
|
|
--- a/include/openssl/cipher.h
|
|
+++ b/include/openssl/cipher.h
|
|
@@ -448,6 +448,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
|
|
|
// EVP_aes_128_cfb128 is only available in decrepit.
|
|
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
|
+OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
|
|
|
// EVP_aes_128_cfb is an alias for |EVP_aes_128_cfb128| and is only available in
|
|
// decrepit.
|