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

Implement Provider for all loaders in tls::Server/Client #1668

Merged
merged 2 commits into from
Mar 29, 2023

Conversation

Mark-Simulacrum
Copy link
Collaborator

This avoids users needing to reimplement the trait with a custom loader implementation.

Description of changes:

As noted in the title, just expands the implementation to all ConfigLoader's.

Testing:

I didn't run any particular tests - including even compiling this, since the feature gating makes that tricky in my environment. Hopefully CI is compiling this? If needed I will play with the options locally some more.

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

@@ -204,7 +204,7 @@ mod default_tls {
use super::*;
use crate::provider::tls;

impl tls::Provider for Server {
impl<L: ConfigLoader> tls::Provider for Server<L> {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this will only work for s2n-tls. The rustls Server don't have a generic loader type. I'm surprised it didn't fail the windows build, which uses rustls by default. But that's a separate issue 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah, interesting. I'll see if I can get the cfgs to cooperate, though testing the permutations here feels iffy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved the implementation to the s2n-tls provider block. I think it's probably best that this code isn't cfg'd for the actual resolved provider (i.e., if we default to s2n-tls we shouldn't change the impl on behalf of users).

This avoids users needing to reimplement the trait with a custom loader
implementation.
@camshaft camshaft enabled auto-merge (squash) March 29, 2023 18:57
@camshaft camshaft merged commit e68c416 into aws:main Mar 29, 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