The current safe API allows the library user to cause a segfault by trying to use Tls::connect without calling Tls::configure first. I'm not sure what the best design to avoid this is, but it caused me a lot of trouble when I didn't realize that Tls::reset also removes the config. Ideally the safe api exposed in the rust bindings would prevent this type of use at compile time.
The current safe API allows the library user to cause a segfault by trying to use
Tls::connect
without callingTls::configure
first. I'm not sure what the best design to avoid this is, but it caused me a lot of trouble when I didn't realize thatTls::reset
also removes the config. Ideally the safe api exposed in the rust bindings would prevent this type of use at compile time.