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

Adding CAs from string rather than file #204

Closed
niltooth opened this issue Aug 19, 2021 · 2 comments
Closed

Adding CAs from string rather than file #204

niltooth opened this issue Aug 19, 2021 · 2 comments
Assignees

Comments

@niltooth
Copy link

Due to deployment concerns and a pki mess, I have my root ca compiled into my app, not in a separate file on disk.

I looked but I could not find a way to manually setup the tls config. In the go client I am able to do this via tls.Config.

@spacejam
Copy link
Contributor

Hey @dev-mull, thanks for opening this issue. I've added a new method to nats::Options which allows manually providing a rustls::ClientConfig for use when connecting to the nats server. Note that this method will keep key material in memory across connections and won't zero key material that is stored in memory as is done normally. This will let you fine-tune any TLS-related configurables to the fullest extent that our backing rustls dependency allows. To avoid rustls version collision issues that may arise due to using other rustls versions in your own crates, I have re-exported the version of rustls that this crate uses at nats::rustls.

#205

I expect to release this a little later today.

Please let me know if you have any other friction with this and I'll try to improve the documentation or functionality to let you be productive.

@niltooth
Copy link
Author

awesome! Thank you!

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