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

Fails to build on systems with OpenSSL 1.1.1 #394

Closed
Fanael opened this issue Sep 18, 2018 · 9 comments
Closed

Fails to build on systems with OpenSSL 1.1.1 #394

Fanael opened this issue Sep 18, 2018 · 9 comments
Labels
bug Something misbehaves or is not working.

Comments

@Fanael
Copy link

Fanael commented Sep 18, 2018

See sfackler/rust-openssl#994.

Serenity pulls in native-tls 0.1.5, which depends on an old version of openssl that doesn't build on systems with OpenSSL 1.1.1.

@arqunis arqunis added the bug Something misbehaves or is not working. label Sep 19, 2018
@Celti
Copy link
Contributor

Celti commented Oct 1, 2018

There's a compat branch that's working just fine (for me) with openssl v1.1.1 at ishitatsuyuki/rust-openssl, with a PR open against rust-openssl v0.9.x.

Try it yourself with a patch entry in Cargo.toml:

[patch.crates-io]
openssl = { git = "https://github.com/ishitatsuyuki/rust-openssl", branch = "0.9.x" }

@Lymia
Copy link
Contributor

Lymia commented Oct 20, 2018

The PR has been closed, because apparently "0.9 is no longer supported" means "even if someone else does the work for us". :|

@ColonelThirtyTwo
Copy link

Gonna start digging into upgrading some stuff on the serenity side to fix this, because as of now you can't build Serenity under Arch Linux, which is a huge pain.

Unfortunately there's another dependency that pulls in the old native-tls code: a crate called evzht9h3nznqzwl, which hasn't been updated in a year and has a description that makes you question why it was even used in the first place. Looks like it's an implementation of websockets.

@Mishio595
Copy link
Contributor

That crate is a fork of a websocket crate that fixed several issues at the time of its creation. The current solution until dependencies are worked out is to use the patch mentioned by @Celti. Said patch allows serenity to work as expected on platforms using newer OpenSSL versions.

@ColonelThirtyTwo
Copy link

@Mishio595 What particular issues?

Just swapped it for websockets and all the tests pass. Gonna try running it.

ColonelThirtyTwo added a commit to ColonelThirtyTwo/serenity that referenced this issue Nov 6, 2018
native-tls v0.1.5 does not detect OpenSSL 1.1.1 when building, causing
compile errors on systems that have it installed (such as Arch).

This patch swaps out the outdated evzht9h3nznqzwl crate with its upstream
websocket crate.

Fixes serenity-rs#394
@ghost
Copy link

ghost commented Nov 6, 2018

@ColonelThirtyTwo websockets-rs/rust-websocket#137

This causes any large payloads to often fail, for example GUILD_CREATEs of medium-large size guilds.

@xacrimon
Copy link
Contributor

Fixed in v0.6.0. Should be closed when it releases.

@Lakelezz Lakelezz closed this as completed Jun 7, 2019
@allquixotic
Copy link

allquixotic commented Aug 25, 2019

How about 0.5.x users? I can't upgrade to 0.6 right now because the API is completely changed and it would take more time than I have in the immediate future (I'm looking at an upgrade later this month though).

I just ran apt update && apt full-upgrade on Ubuntu, it upgraded me to OpenSSL 1.1.1, and my Serenity-based bot is down. Even without recompiling, the TLS handshake code fails and it bombs. I'm afraid that's not OK, but the breakage is apparently on the OpenSSL side more than anything, since it breaks code that compiles and runs. I grabbed the hackaround from Celti above (thanks!) so stuff is compiling for now, but oof that isn't pretty.

@9646516
Copy link

9646516 commented Mar 17, 2020

Since openssl 0.9 doesn't support OpenSSL 1.1.1,so that OpenSSL with old ver is needed
I fix this by manually set OPENSSL_DIR,OPENSSL_LIB_DIR,OPENSSL_INCLUDE_DIR to OpenSSL 1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something misbehaves or is not working.
Projects
None yet
Development

No branches or pull requests

10 participants