Skip to content

Commit 4b95d0e

Browse files
committed
Fixup oaepLabel patch
nodejs/node#30917
1 parent b726509 commit 4b95d0e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

patches/node/revert_crypto_add_oaeplabel_option.patch

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,20 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho
88
be removed when the associated update is rolled into Chromium.
99

1010
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
11-
index 861d321d6170b25e874080d4c70dda201cab3248..ef96843c820a5361056022cea5546e94e5572918 100644
11+
index 7950c68f52050b7c9a6798b653a9c831256b21b5..41b72d010824234c567586524d22cae6ac849edb 100644
1212
--- a/src/node_crypto.cc
1313
+++ b/src/node_crypto.cc
14-
@@ -5365,17 +5365,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
14+
@@ -5514,18 +5514,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
1515
return false;
1616
}
1717

1818
- if (oaep_label_len != 0) {
1919
- // OpenSSL takes ownership of the label, so we need to create a copy.
2020
- void* label = OPENSSL_memdup(oaep_label, oaep_label_len);
2121
- CHECK_NOT_NULL(label);
22-
- if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(), label,
23-
- oaep_label_len)) {
22+
- if (0 >= EVP_PKEY_CTX_set0_rsa_oaep_label(ctx.get(),
23+
- reinterpret_cast<unsigned char*>(label),
24+
- oaep_label_len)) {
2425
- OPENSSL_free(label);
2526
- return false;
2627
- }

0 commit comments

Comments
 (0)