japaric / trust

Travis CI and AppVeyor template to test your Rust crate on 5 architectures and publish binary releases of it for Linux, macOS and Windows
Apache License 2.0
1.26k stars 59 forks source link

SSL errors on Travis #81

Closed musoke closed 5 years ago

musoke commented 7 years ago

I'm switching a small project of mine over to trust. Builds on Travis are failing when they didn't previously. I'm getting SSL errors when testing the crate with TARGET=*-unknown-linux-* on Travis. darwin is fine, and the tests don't run on BSD or Windows. Testing locally on debian and arch linux also works.

It looks like reqwest can't find certificates:

Error { kind: Io(Error { repr: Custom(Custom { kind: Other, error: Ssl(ErrorStack([Error { code: 336134278, library: \"SSL routines\", function: \"ssl3_get_server_certificate\", reason: \"certificate verify failed\", file: \"s3_clnt.c\", line: 1264 }])) }) }), url: Some(\"https://inspirehep.net/search?of=hx&p=Higgs%3A2014aqa\")

Example log on Travis Line where the panic happens

This looks like a related issue: https://github.com/japaric/trust/issues/55 . It's not exactly same though; everything seems to build but there is an error during tests.

Thanks for this project!

musoke commented 7 years ago

Disabling https is a temporary work around: https://travis-ci.org/musoke/inspirer/builds/271306689

Possibly also related: https://github.com/seanmonstar/reqwest/issues/70

japaric commented 7 years ago

Interesting: the errors are not from running the cross command itself but from running the test suite within the cross / Docker environement. Hmm, maybe the ca-certficates inside the Docker images need to be updated. I can test that locally. If that works making a new Cross release should fix all the trust instances.

japaric commented 7 years ago

I tried a few things here: just rebuilding the Docker image as it is, bumping the OpenSSL version, basing the Docker image on a more recent OS (12.04 -> 14.04) but I still see the same problem.

I must admit that I don't understand the root of the problem. A similar problem was reported in japaric/cross#119; in that case, a binary compiled with Cross doesn't work when executed on the host (not in the Cross environement) because it panics with some SSL related error.

musoke commented 7 years ago

Thanks for looking into this!

StefanoChiodino commented 6 years ago

Thanks @musoke, I too had this problem and worked around it adding to the Cargo.toml

[dependencies.libinspire]
git = "https://github.com/musoke/libinspire"
branch = "no-https"
StefanoChiodino commented 6 years ago

Spoke too soon! When I download the release file produced by travis I still get the same error!

musoke commented 5 years ago

This issue seems to have been resolved. Don't know how or when.