tokio-postgres-rustls
tokio-postgres-rustls copied to clipboard
expose a feature flag to use aws_lc_rs instead of ring
even if the user overrides the rustls use aws_lc_rs this crate still uses ring for digest calculation. same behaviour with the same api exists in aws_lc_rs so this pr exposes a feature flag to switch between the two. To not break anything it still uses ring by default. One thing to add is to inform user by a compile error if both feature are enabled at the same time. I am thinking of doing it something like this lemme know if this looks ok
#[cfg(all(feature = "aws-lc-rs", not(feature = "ring")))]
use aws_lc_rs::digest;
#[cfg(all(feature = "ring", not(feature = "aws-lc-rs")))]
use ring::digest;
#[cfg(all(feature = "ring", feature = "aws-lc-rs"))]
compile_error!("Please only enable 'aws-lc-rs' or 'ring'")