Open zvolin opened 1 year ago
@sfackler you wrote
I'd probably just recommend people not use PKCS#12 anymore.
https://github.com/sfackler/rust-native-tls/issues/245#issuecomment-1324355197
Can we deprecate the p12 API and not require it for new platform implementations?
Yo, this is my attempt to resolve #211. The implementation is based on the initial work done by @MabezDev.
There are a few things worth mentioning, where I'd like to use some guidance:
this breaks api compatibility. I've changedfn get_ref(&self) -> &S
andfn get_mut(&mut self) -> &mut S
tofn get_ref(&self) -> impl Deref<Target = S>
andfn get_mut(&mut self) -> impl DerefMut<Target = S>
. I'm not sure if that's required, I started with a bit different implementation, but it's the non-unsafe way to haveTlsStream
implSync
. I've checked 3 top dependant crates:Reqwest
,hyper-tls
andtokio-native-tls
and only the last one failed, on tests ofsmoke.rs
. If we decide to go this way I'm happy to run tests on all dependant crates and create the issues that'll warn about bumping this. If not, I can try the other ways. The other possible solutions would be to make this change only on mbedtls targets (but not uniform api is a painpoint) / try to implement this differently (but likely with unsafe).mbedtls
.A disclaimer, I'm not really familiar with HTTPS/TLS/SSL spec and implementations and also with networking in general :sweat_smile: so I'll be thankful for a careful review