Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

crypto.sign swallows OpenSSL errors #40794

Copy link
Copy link
@tniessen

Description

@tniessen
Issue body actions

Version

current

Platform

all

Subsystem

crypto

What steps will reproduce the bug?

crypto.sign('sha512', '', crypto.generateKeyPairSync('rsa', { modulusLength: 512 }).privateKey)

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

One of the internal OpenSSL calls must fail, in this case, due to incompatible digest and modulus length.

What is the expected behavior?

A useful error message.

What do you see instead?

Uncaught Error: Deriving bits failed
    at Object.signOneShot [as sign] (node:internal/crypto/sig:181:42)

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.cryptoIssues and PRs related to the crypto subsystem.Issues 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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.