Skip to content

error:25066067:DSO support routines:dlfcn_load:could not load the shared library #43132

Closed
@laneme

Description

@laneme

Version

16.15.0

Platform

Linux usernam 5.15.0-30-generic #31-Ubuntu SMP Thu May 5 10:00:34 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

Very unfornutalely i cannot find a way to reproduce this accross platforms but its worth noting that this problem isnt specific to version 16.15.0. It happens on 16.10.0 and 18.* too

The following code is what triggers the error

var crypto = require('crypto')
var sign = crypto.createSign('RSA-SHA256')
sign.update(some_buffer)
sign.sign(some_private_key)

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

It DOES throw on the machine with OpenSSL 3.0.2, it does NOT throw on the OpenSSL 1.1.1f machine.

What is the expected behavior?

Expecting a signed buffer returned from crypto.sign funciton.

What do you see instead?

node:internal/crypto/sig:131
  const ret = this[kHandle].sign(data, format, type, passphrase, rsaPadding,
                            ^

Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
    at Sign.sign (node:internal/crypto/sig:131:29)
    at Object.<anonymous> (/mytestfile.js:4:8)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
    at node:internal/main/run_main_module:17:47 {
  opensslErrorStack: [
    'error:0907B00D:PEM routines:PEM_read_bio_PrivateKey:ASN1 lib',
    'error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error',
    'error:0D068066:asn1 encoding routines:asn1_check_tlen:bad object header',
    'error:0D07207B:asn1 encoding routines:ASN1_get_object:header too long',
    'error:0E076071:configuration file routines:module_run:unknown module name',
    'error:0E07506E:configuration file routines:module_load_dso:error loading dso',
    'error:25070067:DSO support routines:DSO_load:could not load the shared library'
  ],
  library: 'DSO support routines',
  function: 'dlfcn_load',
  reason: 'could not load the shared library',
  code: 'ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY'
}

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions