aatxe / irc

the irc crate – usable, async IRC for Rust
Mozilla Public License 2.0
530 stars 97 forks source link

Suggestion to replace openssl with native-tls #71

Closed danielniccoli closed 7 years ago

danielniccoli commented 7 years ago

This is a suggestion to replace openssl with native-tls.

That uses your platform's native TLS implementation (schannel on Windows, security-framework on OS X, OpenSSL elsewhere), which can avoid the problem of having to compile OpenSSL on Windows, using an outdated OpenSSL that ships on OS X, and having to deal with the versioning issues due to API changes between different OpenSSL versions.

Source: https://www.reddit.com/r/rust/comments/5ok6r8/openssl_11/dck0r48/

aatxe commented 7 years ago

This is related to #62.

dariost commented 7 years ago

It's also worth mentioning Rustls, which is a pure Rust TLS implementation, as a possible alternative to openssl

qlyoung commented 7 years ago

In case anyone is trying to use this library with hyper or reqwest, but is hitting this dependency conflict (full message for google-ability):

error: native library `openssl` is being linked to by more than one version of
the same package, but it can only be linked once; try updating or pinning your
dependencies to ensure that this package only shows up once

  openssl-sys v0.9.13
  openssl-sys v0.7.17

If you don't mind dropping TLS support from irc, you can use this in your cargo.toml under the dependencies section to avoid linking against the outdated openssl:

irc = { version = "0.11.8", default-features = false }

aatxe commented 7 years ago

With the new 0.12.0 release, we use native-tls. :)