Calling openssl_env_init() on FreeBSD breaks certificate validation with the system default trutstore

未关闭
#1,129 0 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #1130 来自 @michael-o —— 已关闭,未合并

评估

难度
4/5
预计耗时
3-5 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
rust

调研方向

先阅读 init() 及其对 openssl_env_init() 的调用,然后检查 openssl_probe::init_ssl_cert_env_vars() 和 issue 中链接的 curl-rust 处理器配置。在 FreeBSD 上使用系统 truststore 重现证书验证,并确定环境变量的预期行为;完成的标准是验证能够使用 certctl 管理的默认值正常工作,且不会发生不需要的覆盖。

由索引模型根据 Issue 内容生成。

描述

Though, I have reported this upstream, but since git2-rs is a downstream consumer and effectively renders the process environment useless, therefore reporting here again.

init() calls openssl_env_init() in good spirit, but completely breaks certificate validation because openssl_probe::init_ssl_cert_env_vars() sets invalid environment variables. This directly affects cargo since it uses curl-rust which in turn uses system's OpenSSL.
FreeBSD has a system default truststore managed by certctl(8) which is wired with the system's OpenSSL. There is no need to override that in anyway unless the user wishes to. I have a working simple patch which solves the issue for FreeBSD. I cannot tell for other systems, but this call could be problematic somewhere else as well, thefore curl-rust adds an explict off-by-default config for it: https://github.com/alexcrichton/curl-rust/blob/da8ebac10b60458e73d32a9c5834b08c980d5b59/src/easy/handler.rs#L677

PS: I am a FreeBSD committer.

主要语言
Rust
星标
2.1k
派生
470
平均合并
2 天 17 小时
30 天内合并 PR
18

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rust-lang/git2-rs 的其他 Issue

查看 rust-lang/git2-rs 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。