alexcrichton / curl-rust

Rust bindings to libcurl
MIT License
1.02k stars 234 forks source link

Initialize openssl-probe env vars if curl requires init #418

Closed alexcrichton closed 2 years ago

alexcrichton commented 2 years ago

This commit should fix an issue that showed up in rust-lang/cargo#10013 where curl's initialization was accidentally detecting that curl needed an early initialization (due to sfackler/rust-openssl#1548). This early initialization caused the later env-vars set by openssl-probe to not actually be read since OpenSSL was already initialized. While not an issue for curl I think it does pose an issue for other libraries like libgit2 using OpenSSL.

The fix here is to initialize the env vars before OpenSSL, which should have OpenSSL pick up the probe results.