【问题标题】:Cargo fails because the peer certificate cannot be authenticated with given CA certificates on SLES11Cargo 失败,因为对等证书无法使用 SLES11 上的给定 CA 证书进行身份验证
【发布时间】:2016-11-13 16:37:51
【问题描述】:

我正在尝试让 Rust 和 Cargo 在运行 SUSE Linux Enterprise Server 11 (SLES11) 的 VM 上运行,并在尝试编译 rust-by-example 程序时出现 SSL 错误:

cargo --version
cargo 0.13.0-nightly (109cb7c 2016-08-19)

cargo build --verbose
Downloading rustc-serialize v0.3.19
error: unable to get packages from source

Caused by:
[60] Peer certificate cannot be authenticated with given CA certificates

Git 和 curl 在机器上正常工作。知道问题可能是什么吗?

这似乎是 Cargo 的一个问题,但应该已经解决了 (?)。我按照建议做了一个 strace 以查看它在哪里寻找证书并得到了这个:

stat64("/etc/ssl/certs/3513523f.0", 0xbffebe9c) = -1 ENOENT (No such file or directory)
stat64("/etc/ssl/certs/85cf5865.0", 0xbffebe9c) = -1 ENOENT (No such file or directory)

它搜索的两个都不存在。我不知道从哪里开始,哪些证书是有效/好的,所以任何帮助都会很好。

【问题讨论】:

  • 通过我的搜索,SLES 11 appears to be pretty old2012 年 2 月,SLES 11 SP2 发布)。我的猜测是您拥有的 CA 捆绑包也较旧。我建议查看如何根据您的发行版更新您的系统 CA 捆绑包。
  • 是的,它很古老。不幸的是,我为一个系统绑定了它(也让 Haskell 致力于它)。好的,将看看更新 CA 包。
  • @MichaelO:Cargo 尝试联系crates.io,您是否检查过在该系统上使用您选择的浏览器导航到该站点?还是使用带有 SSL 验证的 Curl?
  • 是的,curl 可以访问该站点,以及 git 和 Firefox(旧版本)。只有货物存在这些问题。

标签: rust ssl-certificate rust-cargo


【解决方案1】:

我更新了本地证书,现在我可以在 SLES11 上使用 Cargo 下载代码。

【讨论】:

    猜你喜欢
    • 2017-03-16
    • 2020-06-27
    • 2017-11-26
    • 1970-01-01
    • 2013-01-12
    • 2013-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多