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

Update to curl 7.82.0 and remove MesaLink #438

Merged
merged 4 commits into from
Mar 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ with various Cargo features:
- `rustls` Enable SSL/TLS support via [Rustls], a well-received alternative TLS backend written in Rust. Rustls is always statically linked. Disabled by default.

Note that Rustls support is experimental within Curl itself and may have significant bugs, so we don't offer any sort of stability guarantee with this feature.
- `mesalink`: Enable SSL/TLS support via [MesaLink], an alternative TLS backend written in Rust based on [Rustls]. MesaLink is always statically linked. Disabled by default.
- `http2`: Enable HTTP/2 support via libnghttp2. Disabled by default.
- `static-curl`: Use a bundled libcurl version and statically link to it. Disabled by default.
- `static-ssl`: Use a bundled OpenSSL version and statically link to it. Only applies on platforms that use OpenSSL. Disabled by default.
Expand Down Expand Up @@ -169,7 +168,6 @@ details.


[libcurl]: https://curl.haxx.se/libcurl/
[MesaLink]: https://mesalink.io/
[OpenSSL]: https://www.openssl.org/
[Rustls]: https://github.com/ctz/rustls
[Schannel]: https://docs.microsoft.com/en-us/windows/win32/com/schannel
Expand Down
9 changes: 2 additions & 7 deletions curl-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "curl-sys"
version = "0.4.52+curl-7.81.0"
version = "0.4.52+curl-7.82.0"
authors = ["Alex Crichton <[email protected]>"]
links = "curl"
build = "build.rs"
Expand All @@ -24,12 +24,6 @@ libz-sys = { version = "1.0.18", default-features = false, features = ["libc"] }
libc = "0.2.2"
libnghttp2-sys = { optional = true, version = "0.1.3" }

[dependencies.mesalink]
version = "1.1.0-cratesio"
optional = true
default-features = false
features = ["client_apis", "error_strings", "tls13", "aesgcm", "chachapoly", "x25519", "ecdh", "ecdsa", "verifier"]

[dependencies.rustls-ffi]
version = "0.8"
optional = true
Expand All @@ -52,6 +46,7 @@ cc = "1.0"
default = ["ssl"]
ssl = ["openssl-sys"]
http2 = ["libnghttp2-sys"]
mesalink = []
rustls = ["rustls-ffi"]
static-curl = []
static-ssl = ["openssl-sys/vendored"]
Expand Down
34 changes: 13 additions & 21 deletions curl-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ fn main() {
let target = env::var("TARGET").unwrap();
let windows = target.contains("windows");

if cfg!(feature = "mesalink") {
println!("cargo:warning=MesaLink support has been removed as of curl 7.82.0, will use default TLS backend instead.");
}

// This feature trumps all others, and is largely set by rustbuild to force
// usage of the system library to ensure that we're always building an
// ABI-compatible Cargo.
Expand Down Expand Up @@ -158,12 +162,10 @@ fn main() {
.file("curl/lib/hash.c")
.file("curl/lib/hmac.c")
.file("curl/lib/hostasyn.c")
.file("curl/lib/hostcheck.c")
.file("curl/lib/hostip.c")
.file("curl/lib/hostip6.c")
.file("curl/lib/hsts.c")
.file("curl/lib/http.c")
.file("curl/lib/http2.c")
.file("curl/lib/http_aws_sigv4.c")
.file("curl/lib/http_chunks.c")
.file("curl/lib/http_digest.c")
Expand Down Expand Up @@ -205,6 +207,7 @@ fn main() {
.file("curl/lib/version.c")
.file("curl/lib/vauth/digest.c")
.file("curl/lib/vauth/vauth.c")
.file("curl/lib/vtls/hostcheck.c")
.file("curl/lib/vtls/keylog.c")
.file("curl/lib/vtls/vtls.c")
.file("curl/lib/warnless.c")
Expand Down Expand Up @@ -239,7 +242,9 @@ fn main() {

if cfg!(feature = "http2") {
cfg.define("USE_NGHTTP2", None)
.define("NGHTTP2_STATICLIB", None);
.define("NGHTTP2_STATICLIB", None)
.file("curl/lib/h2h3.c")
.file("curl/lib/http2.c");

println!("cargo:rustc-cfg=link_libnghttp2");
if let Some(path) = env::var_os("DEP_NGHTTP2_ROOT") {
Expand All @@ -261,20 +266,7 @@ fn main() {

// Configure TLS backend. Since Cargo does not support mutually exclusive
// features, make sure we only compile one vtls.
if cfg!(feature = "mesalink") {
cfg.define("USE_MESALINK", None)
.file("curl/lib/vtls/mesalink.c");

if let Some(path) = env::var_os("DEP_MESALINK_INCLUDE") {
cfg.include(path);
}

if windows {
cfg.define("HAVE_WINDOWS", None);
} else {
cfg.define("HAVE_UNIX", None);
}
} else if cfg!(feature = "rustls") {
if cfg!(feature = "rustls") {
cfg.define("USE_RUSTLS", None)
.file("curl/lib/vtls/rustls.c")
.include(env::var_os("DEP_RUSTLS_FFI_INCLUDE").unwrap());
Expand All @@ -285,17 +277,17 @@ fn main() {
cfg.define("USE_WINDOWS_SSPI", None)
.define("USE_SCHANNEL", None)
.file("curl/lib/http_negotiate.c")
.file("curl/lib/x509asn1.c")
.file("curl/lib/curl_sspi.c")
.file("curl/lib/socks_sspi.c")
.file("curl/lib/vauth/spnego_sspi.c")
.file("curl/lib/vauth/vauth.c")
.file("curl/lib/vtls/schannel.c")
.file("curl/lib/vtls/schannel_verify.c");
.file("curl/lib/vtls/schannel_verify.c")
.file("curl/lib/vtls/x509asn1.c");
} else if target.contains("-apple-") {
cfg.define("USE_SECTRANSP", None)
.file("curl/lib/x509asn1.c")
.file("curl/lib/vtls/sectransp.c");
.file("curl/lib/vtls/sectransp.c")
.file("curl/lib/vtls/x509asn1.c");
if xcode_major_version().map_or(true, |v| v >= 9) {
// On earlier Xcode versions (<9), defining HAVE_BUILTIN_AVAILABLE
// would cause __bultin_available() to fail to compile due to
Expand Down
2 changes: 1 addition & 1 deletion curl-sys/curl
Submodule curl updated 389 files
2 changes: 0 additions & 2 deletions curl-sys/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
extern crate libnghttp2_sys;
#[cfg(link_libz)]
extern crate libz_sys;
#[cfg(feature = "mesalink")]
extern crate mesalink;
#[cfg(link_openssl)]
extern crate openssl_sys;
#[cfg(feature = "rustls")]
Expand Down