-
-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add support for custom root certificate #443
Comments
Thanks for the diagnosis. But if I understand correctly, shouldn't this be reported to |
Thank you for picking this up! I believe the current trend of implementing HTTPS client is to not obey what an OS says about the root CA they trust, but let the application/user side specifically adds a custom root CA by themselves.
I am not sure if this is the correct place for the implementation but I see in this line, this uses the default built-in root CAs which means it doesn't use the OS setting. |
I see, so you essentially want to add taplo/crates/taplo-lsp/src/world.rs Lines 127 to 129 in 5bd9625
The question is where do you get I think the simplest solution would be to just use an environment variable (or use a flag with a global variable). Would you be able to write a PR? If not, I could take a look this weekend, but I'll need you to be able to test it or provide instructions on how to test it. |
Yes, that's what I wanted to do essentially. To confirm my understanding, does the flag you mentioned mean something that is passed from the LSP configuration? (I am thinking about nvim-lspconfig#taplo). Environment variable could work too and I agree it would be the simplest way to do it. Though I am not really sure about the design. I guess we could do both. On the other hand, do we need to also implement this for I am willing to help and write a PR, but I would need some pointers on where to look. |
Actually I had it wrong, we need 2 things:
And we also need to update the taplo/crates/taplo-cli/src/lib.rs Lines 24 to 26 in 5bd9625
Yes, but I'm not sure it's worth the effort.
Yes, I think we need to do that.
Great! Thanks a lot! Let's only do the environment variable. You essentially need to:
|
Request
Add an ability to define a custom root certificate for querying a schema from the Internet.
Motivation
In my environment, it's necessary to use a custom root certificate.
I am using Taplo as a language server with Neovim. Here is what I would get when I opened a
Cargo.toml
file.An error from Neovim
:LspLog
I have already setup my OS to trust the custom certificate. Also it seems that this crate uses
reqwest
to do the query.I believe
reqwest
doesn't get the list of root certificates from the OS.The text was updated successfully, but these errors were encountered: