Skip to content

"SSL peer certificate or SSH remote key was not OK" error with latest nightly cargo on FreeBSD #16357

@asomers

Description

@asomers

Problem

All of my CI jobs that use nightly Rust on FreeBSD began to fail on about 4-December with this error:

cargo +$VERSION test
    Updating crates.io index
error: failed to get `mio` as a dependency of package `mio-aio v1.0.0 (/tmp/cirrus-ci-build)`
Caused by:
  download of config.json failed
Caused by:
  failed to download from `https://index.crates.io/config.json`
Caused by:
  [60] SSL peer certificate or SSH remote key was not OK (SSL certificate OpenSSL verify result: unable to get local issuer certificate (20))
Exit status: 101

The CI environment has not changed, I don't see this problem on stable Rust, and I don't see this problem on Linux. Nor have I yet been able to reproduce the problem on a local FreeBSD VM.

Links to some failed builds:
https://cirrus-ci.com/task/5129181652058112
https://cirrus-ci.com/task/6459889154785280
https://cirrus-ci.com/task/5444677467373568
https://cirrus-ci.com/task/6421169420632064

Steps

  1. On a fresh FreeBSD 13.5 and 14.3 VM (15.0 not affected), install nightly Rust toolchain
  2. Run virtually any cargo command on any repository.

Possible Solution(s)

No response

Notes

No response

Version

cargo version --verbose
cargo 1.94.0-nightly (2c283a9a5 2025-12-04)
release: 1.94.0-nightly
commit-hash: 2c283a9a5c5968eeb9a8f12313f04feb1ff8dfac
commit-date: 2025-12-04
host: x86_64-unknown-freebsd
libgit2: 1.9.1 (sys:0.20.2 vendored)
libcurl: 8.17.0-DEV (sys:0.4.84+curl-8.17.0 vendored ssl:OpenSSL/3.5.4)
ssl: OpenSSL 3.5.4 30 Sep 2025
os: FreeBSD 14.3-RELEASE [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-networkingArea: networking issues, curl, etc.C-bugCategory: bugO-freebsdOS: FreeBSDS-blocked-externalStatus: ❌ blocked on something out of the direct control of the Cargo project, e.g., upstream fixregression-from-stable-to-betaRegression in beta that previously worked in stable.

    Type

    No type

    Projects

    Status

    Nominated

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions