Genuine question, should I prefer rustls or openssl for security in rust.
A reasonable number of crates let you switch between them with just a cfg flag, and when using them the only difference that makes it way to the user is security (and maybe performance), but I'm not sure which I should consider to be more secure?
At this point we consider rustls about as secure or a little more. Ring is a high-quality set of primitives thats basically some carefully ported boringssl code, and both it and rustls have been around for a good while and have plenty of contributors. Tbh we like the lack of old legacy cruft (where most openssl bugs get found) as much as a memory-safe language, ditching all that ancient code we don't need really cuts down attack surface.
A reasonable number of crates let you switch between them with just a cfg flag, and when using them the only difference that makes it way to the user is security (and maybe performance), but I'm not sure which I should consider to be more secure?