Skip to content

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

@jelly

Description

@jelly

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.cryptoIssues and PRs related to the crypto subsystem.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions