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

MSRV >= 1.76: Tidy up crypto provider customization #450

Open
cpu opened this issue Jul 30, 2024 · 0 comments
Open

MSRV >= 1.76: Tidy up crypto provider customization #450

cpu opened this issue Jul 30, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@cpu
Copy link
Member

cpu commented Jul 30, 2024

In the crypto provider integration code's CryptoProviderBuilder struct (from #441), there is an instance of awkward CryptoProvider initialization:

        CryptoProvider {
            cipher_suites,
            kx_groups: self.base.kx_groups.clone(),
            signature_verification_algorithms: self.base.signature_verification_algorithms,
            secure_random: self.base.secure_random,
            key_provider: self.base.key_provider,
        }

We would ideally use the struct update syntax, .. to fill in the non-customized fields (everything but cipher_suites), but we can't do that naively with the Arc<CryptoProvider> we have as a base - we need a CryptoProvider.

Arc::unwrap_or_clone() would allow this in a convenient fashion but we can't use that until our MSRV is >= 1.76, so this issue is a reminder for the future.

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

No branches or pull requests

1 participant