From 81c9e0ba25acb6288330b85ba2c558f587d92782 Mon Sep 17 00:00:00 2001 From: Luca Casonato Date: Mon, 16 Sep 2024 13:04:40 +0200 Subject: fix(ext/crypto): support md4 digest algorithm (#25656) Fixes #25646 --- ext/node/ops/crypto/digest.rs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ext') diff --git a/ext/node/ops/crypto/digest.rs b/ext/node/ops/crypto/digest.rs index 1bb028155..293e8e063 100644 --- a/ext/node/ops/crypto/digest.rs +++ b/ext/node/ops/crypto/digest.rs @@ -80,6 +80,10 @@ macro_rules! match_fixed_digest_with_eager_block_buffer { type $type = ::sm3::Sm3; $body } + "rsa-md4" | "md4" | "md4withrsaencryption" => { + type $type = ::md4::Md4; + $body + } "md5-sha1" => { type $type = crate::ops::crypto::md5_sha1::Md5Sha1; $body @@ -260,6 +264,7 @@ impl Hash { pub fn get_hashes() -> Vec<&'static str> { vec![ + "RSA-MD4", "RSA-MD5", "RSA-RIPEMD160", "RSA-SHA1", @@ -281,6 +286,8 @@ impl Hash { "id-rsassa-pkcs1-v1_5-with-sha3-256", "id-rsassa-pkcs1-v1_5-with-sha3-384", "id-rsassa-pkcs1-v1_5-with-sha3-512", + "md4", + "md4WithRSAEncryption", "md5", "md5-sha1", "md5WithRSAEncryption", -- cgit v1.2.3