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

Allow rustls provider to be cloned and take in Arcs #1641

Merged
merged 1 commit into from
Feb 28, 2023
Merged

Allow rustls provider to be cloned and take in Arcs #1641

merged 1 commit into from
Feb 28, 2023

Conversation

ifd3f
Copy link
Contributor

@ifd3f ifd3f commented Feb 28, 2023

Resolved issues:

N/A

Description of changes:

Currently, if you have existing ClientConfig and ServerConfig objects from rustls, in order to feed them into s2n-quic, you need to clone the entire backing rustls config objects. This can be an extremely expensive operation memory-wise, especially if you have a large number of certificates installed.

I've changed the code to allow both implementations of tls::Endpoint to be cloned. I've also implemented their respective From<Arc<*>> traits to allow you to construct them from existing Arcs.

Call-outs:

N/A

Testing:

It doesn't alter any major functionality, so if it builds, it should work.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link
Contributor

@camshaft camshaft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Thanks for adding this

@camshaft camshaft merged commit 7b3acf5 into aws:main Feb 28, 2023
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

Successfully merging this pull request may close these issues.

2 participants