Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
zzl0 opened this issue Oct 26, 2023 · 2 comments
Open

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

zzl0 opened this issue Oct 26, 2023 · 2 comments

Comments

@zzl0
Copy link

zzl0 commented Oct 26, 2023

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
Copy link
Collaborator

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

  • Cargo features don't play super nice with different targets unfortunately. I kinda wish that we could have an openssl feature that would be enabled by default for Linux targets but disabled for other targets, but still be enablable on any target. But Cargo features don't work like that.
  • Using OpenSSL on macOS and Windows is not a common desire. Honestly, OpenSSL kinda sucks and I'm already sad to be using it on Linux -- why use it on another platform when you have something better available? If the demand is low, I am not sure if we want the maintenance burden of such a feature.
  • Compiling against OpenSSL on Windows specifically is notoriously complicated with MSVC last time I tried; I'm not even sure if we'd be able to make that work out of the box. (It's fine on macOS.)

@zzl0
Copy link
Author

zzl0 commented Oct 27, 2023

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants