alexcrichton / curl-rust

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

rust-tls #478

Closed zhangbtciab closed 1 year ago

zhangbtciab commented 1 year ago

how to enable rust-tls and disable default ssl ?

sagebind commented 1 year ago

Use the rustls crate feature as documented in the readme:

  • rustls Enable SSL/TLS support via Rustls, a well-received alternative TLS backend written in Rust. Rustls is always statically linked. Disabled by default.

It would be best to disable default features when doing so to ensure that OpenSSL is not included. For example:

[dependencies.curl]
version = "0.4"
default-features = false
features = ["rustls"]