MSRV >= 1.76: Tidy up crypto provider customization
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 170
- Forks
- 43
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 10
Description
In the crypto provider integration code's CryptoProviderBuilder struct (from https://github.com/rustls/rustls-ffi/pull/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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the crypto provider integration code at the CryptoProviderBuilder struct and review how its base Arc is used. Once the MSRV is at least 1.76, replace the explicit non-customized field initialization with struct update syntax while preserving the customized cipher_suites field; verify the integration still builds and tests pass.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cryptography, security
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100