Make ring an optional dependency in pingora-rustls#887
Conversation
592d130 to
7687fae
Compare
|
Hi Matt, The approach is more like I see in other crates and also pingora, only a generic rustls feature. Than user choose, in this case, 2 options: ring or aws lc rs. Here is how I am using Than I have no ring in my tree and all use fips. The only changed from #630 is All other crates can keep the rustls feature as it is |
7687fae to
1d5bac0
Compare
|
Thanks @53v3n3d4, this approach makes sense. However there are a couple of concerns with it:
I've updated the PR with some improvements:
|
1d5bac0 to
0c6a508
Compare
|
Maybe follow rustls which currently is maintaining aws lc rs and ring. The others make a custom CryptoProvider. For me having a way to use aws lc rs through rustls is ok. About the sha, in fips this will be not allowed correct? I ended up not using a default ring, user should select, and other crates stay clean. |
Make
ringoptional inpingora-rustlsAlternative to #630.
Summary
pingora-rustlsunconditionally depends onringand activatesrustls/ring, which prevents consumers from using a differentCryptoProvider(e.g.aws-lc-rs, Apple corecrypto, Windows CNG, or custom FIPS implementations).This PR makes
ringan optional, default-on feature and adds arustls-basefeature across the crate stack for consumers who want to provide their ownCryptoProvider.Fully backward compatible:
features = ["rustls"]continues to includering.New dep:
sha2 = "0.10"- replacesring::digestinhash_certificate()so it works regardless ofCryptoProvider.Usage