Test test/parallel/test-crypto-oneshot-hash.js fails in OpenSSL 3.4.0 due to breaking changes in OpenSSL

Version

23.3.0 and main

Platform

Linux X 6.12.1-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 22 Nov 2024 16:04:27 +0000 x86_64 GNU/Linux

Subsystem

crypto

What steps will reproduce the bug?

const crypto = require('crypto');
crypto.hash('shake128', "wefwwfe", "utf-8")

How often does it reproduce? Is there a required condition?

100%

What is the expected behavior? Why is that the expected behavior?

Hashing does not throw an Error

What do you see instead?

> crypto.hash('shake128', "wefwwfe", "utf-8")
Uncaught Error: error:00000000:lib(0)::reason(0)
    at Object.hash (node:internal/crypto/hash:216:10)
>

Additional information

This is due to a breaking change in OpenSSL 3.4.0 which makes providing an output length mandatory.

See also, how this is completely broken.

[jelle@natrium][~/projects/node]%openssl shake128 /etc/os-release
[jelle@natrium][~/projects/node]%

Further writeup available here.