electron/patches/node/revert_crypto_add_oaeplabel_option.patch
Electron Bot 39baf68790
chore: bump chromium to 5b340c815ce15ab2efcf277ed19e9 (master) (#22064)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: loc <andy@slack-corp.com>
Co-authored-by: Robo <hop2deep@gmail.com>
Co-authored-by: Jeremy Apthorp <nornagon@nornagon.net>
2020-03-03 13:35:05 -08:00

32 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Tue, 15 Oct 2019 11:30:27 -0700
Subject: Revert "crypto: add oaepLabel option"
This partially reverts https://github.com/nodejs/node/pull/29489.
The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this should
be removed when the associated update is rolled into Chromium.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 7950c68f52050b7c9a6798b653a9c831256b21b5..41b72d010824234c567586524d22cae6ac849edb 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5514,18 +5514,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
return false;
}
- if (oaep_label_len != 0) {
- // OpenSSL takes ownership of the label, so we need to create a copy.
- void* label = OPENSSL_memdup(oaep_label, oaep_label_len);
- CHECK_NOT_NULL(label);
- if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(),
- reinterpret_cast<unsigned char*>(label),
- oaep_label_len)) {
- OPENSSL_free(label);
- return false;
- }
- }
-
size_t out_len = 0;
if (EVP_PKEY_cipher(ctx.get(), nullptr, &out_len, data, len) <= 0)
return false;