mysql_async icon indicating copy to clipboard operation
mysql_async copied to clipboard

rustls: features guide backend

Open serprex opened this issue 10 months ago • 4 comments

rustls replaced ring with aws-lc-rs as default crypto backend, expose features to select between the two, along with a feature on whether to enable tls 1.2

serprex avatar Apr 24 '24 02:04 serprex

as an aside, rust features are supposed to be additive, this is not currently the case with rustls/native-tls features. If both features are enabled the compile fails. Would you be interested in having changes made to rectify that?

I think the fix would be to have each crypto backend use a different Opts (ie, ssl_opts would be ssl_opts_native & ssl_opts_rustls). Could get more complicated with traits, but doesn't seem necessary

serprex avatar Apr 24 '24 02:04 serprex

Completed as part of https://github.com/blackbeam/mysql_async/pull/313

westy92 avatar Jul 23 '24 14:07 westy92

@westy92 that PR doesn't include adding ring/aws-lc-rs features now that rustls made their crypto backend configurable. Setting features = [] on rustls will run into problems if application using mysql_async lacks another dependency to same version of rustls setting which backend to include

serprex avatar Jul 23 '24 17:07 serprex

@westy92 that PR doesn't include adding ring/aws-lc-rs features now that rustls made their crypto backend configurable. Setting features = [] on rustls will run into problems if application using mysql_async lacks another dependency to same version of rustls setting which backend to include

I'd love the feature flag to have rustls with ring as an option. I was getting build errors in CI with the latest version because of the missing dependencies required for aws-lc-rs and had to revert to 0.34.1

sorokya avatar Aug 15 '24 16:08 sorokya