Skip to content

PEM_read_bio_PrivateKey() pushes multiple errors on the error stack #18110

@RaisinTen

Description

@RaisinTen

In OpenSSL 3, when we use PEM_read_bio_PrivateKey() to read a private key with an empty passphrase, it pushes multiple errors on the stack.

opensslErrorStack: [
  'error:04800068:PEM routines::bad password read',
  'error:07880109:common libcrypto routines::interrupted or cancelled'
]

Is this a bug or is nodejs/node#42400 the right way to handle errors coming from PEM_read_bio_PrivateKey()? Or is there another way to prevent having multiple errors on the stack?

Metadata

Metadata

Assignees

No one assigned

    Labels

    branch: 3.0Applies to openssl-3.0 branchbranch: masterApplies to master branchresolved: answeredThe issue contained a question which has been answeredtriaged: questionThe issue contains a question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions