Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to call configure results in a segfault #2

Open
olivia-fl opened this issue May 5, 2020 · 1 comment
Open

Failing to call configure results in a segfault #2

olivia-fl opened this issue May 5, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@olivia-fl
Copy link

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.

@reyk
Copy link
Owner

reyk commented May 5, 2020

You’re right, thanks for the report. I want to stay close to the libtls API but such unsafe behavior should be avoided with an internal state.

@reyk reyk added the bug Something isn't working label May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants