Skip to content

Commit 3bfd27e

Browse files
committed
crypto: ensure valid point on elliptic curve in SubtleCrypto.importKey
nodejs/node#50234
1 parent 3b39819 commit 3bfd27e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

patches/node/fix_handle_boringssl_and_openssl_incompatibilities.patch

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,18 +253,18 @@ index 3fa4a415dc911a13afd90dfb31c1ed4ad0fd268f..fa48dffc31342c44a1c1207b9d4c3dc7
253253
return EVPKeyCtxPointer();
254254

255255
diff --git a/src/crypto/crypto_keys.cc b/src/crypto/crypto_keys.cc
256-
index 35474c31bfc2e3692b7ca10e4ed7026b9c275dfb..43c42c14f75018d4705f218fe4ed7e5dacb46bb8 100644
256+
index 8488fc57faaf722174032c5a927d150c76120d60..c51efc92d4818ee7701b4725585fb7e1d2d644ad 100644
257257
--- a/src/crypto/crypto_keys.cc
258258
+++ b/src/crypto/crypto_keys.cc
259-
@@ -1239,6 +1239,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
259+
@@ -1204,6 +1204,7 @@ void KeyObjectHandle::GetAsymmetricKeyType(
260260
}
261261

262262
bool KeyObjectHandle::CheckEcKeyData() const {
263263
+#ifndef OPENSSL_IS_BORINGSSL
264264
MarkPopErrorOnReturn mark_pop_error_on_return;
265265

266-
const ManagedEVPPKey& key = data_->GetAsymmetricKey();
267-
@@ -1257,6 +1258,9 @@ bool KeyObjectHandle::CheckEcKeyData() const {
266+
const auto& key = data_.GetAsymmetricKey();
267+
@@ -1220,6 +1221,9 @@ bool KeyObjectHandle::CheckEcKeyData() const {
268268
#else
269269
return EVP_PKEY_public_check(ctx.get()) == 1;
270270
#endif

0 commit comments

Comments
 (0)