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 update registry on NetBSD #3312

Closed
tbu- opened this issue Nov 21, 2016 · 7 comments
Closed

Fails to update registry on NetBSD #3312

tbu- opened this issue Nov 21, 2016 · 7 comments

Comments

@tbu-
Copy link
Contributor

tbu- commented Nov 21, 2016

$ cargo build -v
    Updating registry `https://github.com/rust-lang/crates.io-index`
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  [16/-17] The SSL certificate is invalid

Cargo was installed via rustup:

$ rustup show
Default host: x86_64-unknown-netbsd

installed toolchains
--------------------

stable-x86_64-unknown-netbsd
nightly-x86_64-unknown-netbsd (default)

active toolchain
----------------

nightly-x86_64-unknown-netbsd (default)
rustc 1.15.0-nightly (0bd2ce62b 2016-11-19)
$ cargo -V
cargo 0.16.0-nightly (d1bfc01 2016-11-18)
$ rustc -V
rustc 1.15.0-nightly (0bd2ce62b 2016-11-19)

Normal connection to github.com works:

$ curl -IsS https://github.com/ | head -n1
HTTP/1.1 200 OK

I believe the trusted certificates are installed in /etc/ssl/certs/ca-certificates.crt.

@alexcrichton
Copy link
Member

Hm this is listed as a location to find certificates, I wonder why Cargo's not finding that? Is there a strace equivalent on NetBSD to explore what syscalls are being made?

@tbu-
Copy link
Contributor Author

tbu- commented Nov 21, 2016

Relevant excerpt (full log here)

  5151      1 cargo    open("/buildslave/rust-buildbot/slave/nightly-dist-cargo-cross-linux/build//target/openssl/x86_64-unknown-netbsd-install/ssl/openssl.cnf", 0, 0x1b6) Err#2 ENOENT
  5151      1 cargo    __socket30(0x18, 0x2, 0)    Err#47 EAFNOSUPPORT
  5151      1 cargo    __stat50("/var/ssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/share/ssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/local/ssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/local/openssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/local/share", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/lib/ssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/usr/ssl", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/openssl", 0x7f7ffffde570) = 0
  5151      1 cargo    __stat50("/etc/pki/tls", 0x7f7ffffde570) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/ssl", 0x7f7ffffde570) = 0
  5151      1 cargo    __stat50("/etc/openssl/cert.pem", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/openssl/certs.pem", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/openssl/certs/ca-certificates.crt", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/openssl/certs/ca-root-nss.crt", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/openssl/certs", 0x7f7ffffde650) = 0
  5151      1 cargo    __stat50("/etc/ssl/cert.pem", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/ssl/certs.pem", 0x7f7ffffde650) Err#2 ENOENT
  5151      1 cargo    __stat50("/etc/ssl/certs/ca-certificates.crt", 0x7f7ffffde650) = 0

@tbu-
Copy link
Contributor Author

tbu- commented Nov 21, 2016

Setting SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt works by the way.

@alexcrichton
Copy link
Member

Oh it looks like git2 has a whitelist of platforms to do detection on and netbsd isn't there. Want to send a PR for that?

bors added a commit that referenced this issue Nov 25, 2016
@bors bors closed this as completed in b08de74 Nov 26, 2016
@tbu-
Copy link
Contributor Author

tbu- commented Nov 28, 2016

Mh. This wasn't fixed by #3326, could you reopen?

$ cargo --version
cargo 0.16.0-nightly (3568be9 2016-11-26)
$ cargo build --verbose
    Updating registry `https://github.com/rust-lang/crates.io-index`
error: failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
  [16/-17] The SSL certificate is invalid

@alexcrichton
Copy link
Member

Let's get #3340 sorted out first, likely the same issue.

alexcrichton pushed a commit to alexcrichton/cargo that referenced this issue Dec 1, 2016
@tbu-
Copy link
Contributor Author

tbu- commented Dec 7, 2016

This is indeed fixed now. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants