alexcrichton / curl-rust

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

How to make OpenSSL as the TLS backend on Windows and macOS? #536

Open zzl0 opened 8 months ago

zzl0 commented 8 months ago

ssl: Enable SSL/TLS support using the platform-default TLS backend. On Windows this is Schannel, on macOS Secure Transport, and OpenSSL (or equivalent) on all other platforms. Enabled by default.

Thanks for your work on the project. Is there a way to make OpenSSL as the TLS backend on all platforms?

sagebind commented 8 months ago

Not currently, no. There are a few reasons for this:

zzl0 commented 8 months ago

@sagebind Thanks you for the quick response.

After upgrading curl-sys from 0.4.56 to 0.4.68, our cargo-built binary (with Schannel as the TLS backend) is failing with SSL: Couldn't make sense of the data in the certificate. And we have another way to build Rust code, which build curl with OpenSSL, and it works. So I wanted to try to build make curl use OpenSSL with cargo build.