diff --git a/README.md b/README.md index aad5f487a..27ab5e1ae 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 diff --git a/curl-sys/Cargo.toml b/curl-sys/Cargo.toml index e5f3ab649..4161ddb8d 100644 --- a/curl-sys/Cargo.toml +++ b/curl-sys/Cargo.toml @@ -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 "] links = "curl" build = "build.rs" @@ -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 @@ -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"] diff --git a/curl-sys/build.rs b/curl-sys/build.rs index 4bdffcda1..bb173dd55 100644 --- a/curl-sys/build.rs +++ b/curl-sys/build.rs @@ -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. @@ -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") @@ -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") @@ -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") { @@ -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()); @@ -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 diff --git a/curl-sys/curl b/curl-sys/curl index 801bd5138..64db5c575 160000 --- a/curl-sys/curl +++ b/curl-sys/curl @@ -1 +1 @@ -Subproject commit 801bd5138ce31aa0d906fa4e2eabfc599d74e793 +Subproject commit 64db5c575d9c5536bd273a890f50777ad1ca7c13 diff --git a/curl-sys/lib.rs b/curl-sys/lib.rs index 7fa354ed3..5bd87f0a8 100644 --- a/curl-sys/lib.rs +++ b/curl-sys/lib.rs @@ -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")]