Skip to content

Commit 109a027

Browse files
committed
src: refactor IsSupportedAuthenticatedMode
nodejs/node#42368
1 parent f7a5006 commit 109a027

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,20 @@ Upstreams:
1616
- https://github.com/nodejs/node/pull/39138
1717
- https://github.com/nodejs/node/pull/39136
1818

19+
diff --git a/src/crypto/crypto_cipher.cc b/src/crypto/crypto_cipher.cc
20+
index 6c663a2b21d0a29708700d0e19b8e30fa696a1d0..1e4ff83faec60887e8169e612ac1a956130d7e4a 100644
21+
--- a/src/crypto/crypto_cipher.cc
22+
+++ b/src/crypto/crypto_cipher.cc
23+
@@ -25,7 +25,8 @@ using v8::Value;
24+
namespace crypto {
25+
namespace {
26+
bool IsSupportedAuthenticatedMode(const EVP_CIPHER* cipher) {
27+
- switch (EVP_CIPHER_mode(cipher)) {
28+
+ const int mode = EVP_CIPHER_mode(cipher);
29+
+ switch (mode) {
30+
case EVP_CIPH_CCM_MODE:
31+
case EVP_CIPH_GCM_MODE:
32+
#ifndef OPENSSL_NO_OCB
1933
diff --git a/src/crypto/crypto_common.cc b/src/crypto/crypto_common.cc
2034
index ed1aea868d8385b6411103c614f4d12688c8cb30..4864d7cd6a310f31bfdda399996bd2c47977667a 100644
2135
--- a/src/crypto/crypto_common.cc

0 commit comments

Comments
 (0)