unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
* rust:cargo (libcurl) vs. CURL_CA_BUNDLE
@ 2019-08-15 23:14 David Loyall
  2019-09-01 10:58 ` Ludovic Courtès
  0 siblings, 1 reply; 4+ messages in thread
From: David Loyall @ 2019-08-15 23:14 UTC (permalink / raw)
  To: help-guix

Hello.

I think the way `cargo` uses `libcurl` is preventing it from looking
in the `CURL_CA_BUNDLE` environment variable to find where the
certificate authority file is.

Here we see what `cargo` I am using:

    sebboh@geeks ~/projects$ cargo -V
    cargo 1.36.0

Here we see the contents of one of my environment variables:

    sebboh@geeks ~/projects$ echo $CURL_CA_BUNDLE
    /home/sebboh/.guix-profile/etc/ssl/certs/ca-certificates.crt

Here we try to use `cargo` for a common task:

    sebboh@geeks ~/projects$ cargo install rustfmt-nightly
        Updating crates.io index
    error: failed to download from
`https://crates.io/api/v1/crates/rustfmt-nightly/1.4.5/download`

    Caused by:
      [60] SSL peer certificate or SSH remote key was not OK (server
certificate verification failed. CAfile: none CRLfile: none)

Here we see that `curl` itself (from `guix install curl`) works fine
(some lines omitted for brevity).

    sebboh@geeks ~/projects$ curl -v
https://crates.io/api/v1/crates/pkg-config/0.0.1/download
    *   Trying 34.202.125.55:443...
    * TCP_NODELAY set
    * Connected to crates.io (34.202.125.55) port 443 (#0)
    * found 153 certificates in
/home/sebboh/.guix-profile/etc/ssl/certs/ca-certificates.crt
[...]
    < HTTP/1.1 302 Found
[...]
    * Connection #0 to host crates.io left intact

Now what? :)

Please note that I freshly installed `rust:cargo` and did not modify
anything, so maybe our guix package should be updated so it works out
of box.  (Granted I think the TOFU principle for CA certs might be
better but, I guess that is not the topic today.)

Thanks, cheers,
--sebboh

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-09-24 22:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-15 23:14 rust:cargo (libcurl) vs. CURL_CA_BUNDLE David Loyall
2019-09-01 10:58 ` Ludovic Courtès
2019-09-04  0:16   ` David Loyall
2019-09-24 22:22     ` Robin Heinemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).