doy / rbw

unofficial bitwarden cli
https://git.tozt.net/rbw
Other
611 stars 84 forks source link

invalid certificate: UnknownIssuer #75

Closed simon04 closed 1 year ago

simon04 commented 2 years ago

I'm hosting Bitwarden on an internal server. Its HTTPS certificate has been issued from a local certificate authority.

I've configured this certificate authority according to this guide. curl works. rbw login fails.

How to configure the local certificate authority for rbw? Thanks in advance!

> cat /etc/fedora-release
Fedora release 35 (Thirty Five)

> curl --head https://bitwarden.example.local/api/accounts/prelogin
HTTP/2 404
server: nginx/1.20.1
...

> rbw login
rbw login: failed to log in to bitwarden instance: error making api request: error sending request for url (https://bitwarden.example.local/api/accounts/prelogin): error trying to connect: invalid certificate: UnknownIssuer: error trying to connect: invalid certificate: UnknownIssuer: invalid certificate: UnknownIssuer
erkiesken commented 2 years ago

I had similar issue with LetsEncrypt generated certificate. Turned ou the .crt file for my vaultwarden did not contain the full chain of certificates, just the server one. Adding the LE R3 and other intermediate CA cert public keys to .crt and restarting vaultwarden fixed it for me.

doy commented 2 years ago

@simon04: does that workaround work?

doy commented 1 year ago

i'm going to close this out, but let me know if you continue to run into issues.