Page MenuHomeFreeBSD

lang/rust: Make OpenSSL use the system default truststore in Cargo
ClosedPublic

Authored by michaelo on Feb 24 2025, 10:59 AM.
Tags
None
Referenced Files
F175970310: D49120.diff
Wed, Oct 14, 9:49 PM
Unknown Object (File)
Mon, Oct 5, 1:50 PM
Unknown Object (File)
Mon, Oct 5, 8:39 AM
Unknown Object (File)
Fri, Oct 2, 11:10 AM
Unknown Object (File)
Thu, Oct 1, 7:10 AM
Unknown Object (File)
Sep 8 2026, 12:00 AM
Unknown Object (File)
Sep 7 2026, 6:39 AM
Unknown Object (File)
Sep 5 2026, 1:41 PM
Subscribers

Details

Summary

Cargo uses curl-rust and git2-rs (which uses curl-rest as well).
Unfortunately, git2-rs calls openssl_probe::init_ssl_cert_env_vars()
unconditionally which breaks the process environment by setting an invalid
value for SSL_CERT_DIR and then the system default truststore is circumvented,
resulting in certificate validation errors even if certlctl(8) manages
everything nicely.

Upstream issues:

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Rust maintainers, please have a look. This is quite annoying issue especially because it is hard to diagnose from a high level perspective.

This revision is now accepted and ready to land.Mar 7 2025, 1:16 PM

Hope to remove patch when upstream accepts it.