CLI report SSL Shared library issue code: 'ERR_OSSL_DSO_COULD_NOT_LOAD_THE_SHARED_LIBRARY'
Steps To Reproduce
- Using Archlinux Linux 0fb8d3a85aeb 6.0.11-arch1-1
- Download bw-linux-2022.11.0.zip
- ./bw get totp mywebsite
node:internal/crypto/cipher:79
return method(data, format, type, passphrase, buffer, padding, oaepHash,
^
Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
at Object.privateDecrypt (node:internal/crypto/cipher:79:12)
at NodeCryptoFunctionService.rsaDecrypt (/snapshot/clients/apps/cli/build/bw.js:32583:58)
at CryptoService.<anonymous> (/snapshot/clients/apps/cli/build/bw.js:14348:47)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/clients/apps/cli/build/bw.js:13813:58) {
opensslErrorStack: [
'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'
}
Expected Result
The totp code should show up with no error.
Actual Result
node:internal/crypto/cipher:79
return method(data, format, type, passphrase, buffer, padding, oaepHash,
^
Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
at Object.privateDecrypt (node:internal/crypto/cipher:79:12)
at NodeCryptoFunctionService.rsaDecrypt (/snapshot/clients/apps/cli/build/bw.js:32583:58)
at CryptoService.<anonymous> (/snapshot/clients/apps/cli/build/bw.js:14348:47)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/clients/apps/cli/build/bw.js:13813:58) {
opensslErrorStack: [
'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'
}
Screenshots or Videos
No response
Additional Context
I do not have the same issue with 2022.10.0
This seems to be a known issue.
A workaround exists https://github.com/nodejs/node/discussions/43184
But when I build the same bw CLI version 2022.11.0 on Docker with node:16.16.0 on Linux, I do not have the same issue.
I suspect the windows node version used on your CI impacts the Linux build.
Operating System
Linux
Operating System Version
Linux 0fb8d3a85aeb 6.0.11-arch1-1
Shell
Zsh
Build Version
2022.11.0
Issue Tracking Info
- [X] I understand that work is tracked outside of Github. A PR will be linked to this issue should one be opened to address it, but Bitwarden doesn't use fields like "assigned", "milestone", or "project" to track progress.
I am able to reproduce this issue as well on Ubuntu by running a command like bw login --apikey <key>
I can confirm the same issue on ubuntu 22.04 both if you use the zip version of the tool bw or if you install it through snap.
The npm version instead, strangely, works as expected.
Interestingly, I can reproduce this with the npm version.
the configuration change noted in https://askubuntu.com/a/1410124/ seemed to fix a similar error that I was getting while trying to run bw list items. Seems to be related to OpenSSL 3
the configuration change noted in https://askubuntu.com/a/1410124/ seemed to fix a similar error that I was getting while trying to run
bw list items. Seems to be related to OpenSSL 3
Lets put the right words. It does not fix but mitigate the issue as a workaround.
Since only the Windows build from the github action is faulty, something might be broken here. The binary I build from linux with the same node version does not show the same behavior
I have the same issue on Manjaro:
$ bw --version 15:34:12
2022.11.0
$ bw list items --search test
node:internal/crypto/cipher:79
return method(data, format, type, passphrase, buffer, padding, oaepHash,
^
Error: error:25066067:DSO support routines:dlfcn_load:could not load the shared library
at Object.privateDecrypt (node:internal/crypto/cipher:79:12)
at NodeCryptoFunctionService.rsaDecrypt (/snapshot/clients/apps/cli/build/bw.js:32583:58)
at CryptoService.<anonymous> (/snapshot/clients/apps/cli/build/bw.js:14348:47)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/clients/apps/cli/build/bw.js:13813:58) {
opensslErrorStack: [
'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'
}
$ openssl version 15:39:20
OpenSSL 3.0.7 1 Nov 2022 (Library: OpenSSL 3.0.7 1 Nov 2022)
Workaround worked for me too: commenting out providers = provider_sect in /etc/ssl/openssl.cnf
EDIT: Got it fixed in the newer version 2023.1.0 This version doesn't trigger the error anymore.
Unless anyone still reports it as active, it can be closed to me.
This should be fixed with the release of 2023.1.0, relevant PR https://github.com/bitwarden/clients/pull/4165. If anyone else encounters it on the latest version feel free to post a reply and we'll open the issue, or create a new one linking to this.