Skip to content

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

Description

@cpu

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions