Git Product home page Git Product logo

rust-libtls's People

Contributors

notriddle avatar reyk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rust-libtls's Issues

Failing to call `configure` results in a segfault

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.

io::Read and io::Write implementations don't handle errors correctly

tls_read, tls_write, and similar functions have three "error" return values. TLS_WANT_POLLIN and TLS_WANT_POLLOUT are correctly converted to ErrorKind::WouldBlock by rust-libtls, but the generic -1 return value is not. The try_tls! macro attempts to cast the return value to usize if isn't WANT_POLLIN or WANT_POLLOUT, which will overflow. The correct behavior would be to call Tls::last_error if the return value is -1.

I'm currently working on a PR to update this library to tokio 0.3 and fix some issues with the async implementation, but once I'm done with that I can write a PR to fix this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.