Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add support for self-signed certificates #36

Open
SteiMi opened this issue Oct 19, 2023 · 1 comment
Open

feat: add support for self-signed certificates #36

SteiMi opened this issue Oct 19, 2023 · 1 comment

Comments

@SteiMi
Copy link

SteiMi commented Oct 19, 2023

First of all: very cool project! I think this intermediate layer between plugin and llm backend makes a lot of sense.

Now regarding this issue: There is currently no way (that I am aware of) to let llm-ls trust custom self-signed certificates. This makes it impossible to communicate securely with backends that use such certificates.

After looking into this a bit, it seems that this could be alleviated relatively easily by not using the rustls-tls feature when importing reqwest:

reqwest = { version = "0.11", default-features = false, features = ["json", "rustls-tls"] }

By default, reqwest will then use system-native TLS (see: https://docs.rs/reqwest/latest/reqwest/#tls), which would allow the user to simply trust self-signed certificates within the OS and llm-ls should then also automatically trust this certificate.

@McPatate
Copy link
Member

Thanks!

By default AFAIK reqwest uses openssl, for which I've had issues with when building on multiple platforms. There might be a way to do it with rustls, I'd have to dig. Feel free to take a stab at this if you feel like it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants