diff --git a/Cargo.lock b/Cargo.lock index fe62a095c..db769edfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1900,6 +1900,7 @@ dependencies = [ "percent-encoding", "pin-project-lite", "rustls", + "rustls-native-certs", "serde", "serde_json", "serde_urlencoded", @@ -1972,6 +1973,18 @@ dependencies = [ "webpki", ] +[[package]] +name = "rustls-native-certs" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" +dependencies = [ + "openssl-probe", + "rustls", + "schannel", + "security-framework", +] + [[package]] name = "ryu" version = "1.0.5" diff --git a/cargo/BUILD.reqwest.rustls.bazel b/cargo/BUILD.reqwest.rustls.bazel index c5871370c..1de69d207 100644 --- a/cargo/BUILD.reqwest.rustls.bazel +++ b/cargo/BUILD.reqwest.rustls.bazel @@ -55,7 +55,9 @@ rust_library( "mime_guess", "multipart", "rustls", + "rustls-native-certs", "rustls-tls", + "rustls-tls-native-roots", "rustls-tls-webpki-roots", "serde_json", "socks", @@ -110,6 +112,7 @@ rust_library( "@raze__percent_encoding__2_1_0//:percent_encoding", "@raze__pin_project_lite__0_2_6//:pin_project_lite", "@raze__rustls__0_19_1//:rustls", + "@raze__rustls_native_certs__0_5_0//:rustls_native_certs", "@raze__tokio__1_7_0//:tokio", "@raze__tokio_rustls__0_22_0//:tokio_rustls", "@raze__tokio_socks__0_5_1//:tokio_socks", diff --git a/cargo/crates.bzl b/cargo/crates.bzl index 74d75b64a..b0c0c74b1 100644 --- a/cargo/crates.bzl +++ b/cargo/crates.bzl @@ -1941,6 +1941,16 @@ def raze_fetch_remote_crates(): build_file = Label("//cargo/remote:BUILD.rustls-0.19.1.bazel"), ) + maybe( + http_archive, + name = "raze__rustls_native_certs__0_5_0", + url = "https://crates.io/api/v1/crates/rustls-native-certs/0.5.0/download", + type = "tar.gz", + sha256 = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092", + strip_prefix = "rustls-native-certs-0.5.0", + build_file = Label("//cargo/remote:BUILD.rustls-native-certs-0.5.0.bazel"), + ) + maybe( http_archive, name = "raze__ryu__1_0_5", diff --git a/cargo/licenses.json b/cargo/licenses.json index bf8e72eeb..9d2739e84 100644 --- a/cargo/licenses.json +++ b/cargo/licenses.json @@ -1772,6 +1772,15 @@ "license_file": null, "description": "Rustls is a modern TLS library written in Rust." }, + { + "name": "rustls-native-certs", + "version": "0.5.0", + "authors": "Joseph Birr-Pixton ", + "repository": "https://github.com/ctz/rustls-native-certs", + "license": "Apache-2.0 OR ISC OR MIT", + "license_file": null, + "description": "rustls-native-certs allows rustls to use the platform native certificate store" + }, { "name": "ryu", "version": "1.0.5", diff --git a/cargo/remote/BUILD.reqwest-0.11.3.bazel b/cargo/remote/BUILD.reqwest-0.11.3.bazel index a88d92a4f..197089280 100644 --- a/cargo/remote/BUILD.reqwest-0.11.3.bazel +++ b/cargo/remote/BUILD.reqwest-0.11.3.bazel @@ -60,7 +60,9 @@ rust_library( "native-tls", "native-tls-crate", "rustls", + "rustls-native-certs", "rustls-tls", + "rustls-tls-native-roots", "rustls-tls-webpki-roots", "serde_json", "socks", @@ -118,6 +120,7 @@ rust_library( "@raze__percent_encoding__2_1_0//:percent_encoding", "@raze__pin_project_lite__0_2_6//:pin_project_lite", "@raze__rustls__0_19_1//:rustls", + "@raze__rustls_native_certs__0_5_0//:rustls_native_certs", "@raze__tokio__1_7_0//:tokio", "@raze__tokio_native_tls__0_3_0//:tokio_native_tls", "@raze__tokio_rustls__0_22_0//:tokio_rustls", diff --git a/cargo/remote/BUILD.rustls-native-certs-0.5.0.bazel b/cargo/remote/BUILD.rustls-native-certs-0.5.0.bazel new file mode 100644 index 000000000..57bb905de --- /dev/null +++ b/cargo/remote/BUILD.rustls-native-certs-0.5.0.bazel @@ -0,0 +1,91 @@ +""" +@generated +cargo-raze crate build file. + +DO NOT EDIT! Replaced on runs of cargo-raze +""" + +# buildifier: disable=load +load("@bazel_skylib//lib:selects.bzl", "selects") + +# buildifier: disable=load +load( + "@rules_rust//rust:rust.bzl", + "rust_binary", + "rust_library", + "rust_test", +) + +package(default_visibility = [ + # Public for visibility by "@raze__crate__version//" targets. + # + # Prefer access through "//cargo", which limits external + # visibility to explicit Cargo.toml dependencies. + "//visibility:public", +]) + +licenses([ + "notice", # Apache-2.0 from expression "Apache-2.0 OR (ISC OR MIT)" +]) + +# Generated Targets + +# Unsupported target "google" with type "example" omitted + +rust_library( + name = "rustls_native_certs", + srcs = glob(["**/*.rs"]), + aliases = { + }, + crate_features = [ + "default", + "rustls", + ], + crate_root = "src/lib.rs", + crate_type = "lib", + data = [], + edition = "2018", + rustc_flags = [ + "--cap-lints=allow", + ], + tags = [ + "cargo-raze", + "manual", + ], + version = "0.5.0", + # buildifier: leave-alone + deps = [ + "@raze__rustls__0_19_1//:rustls", + ] + selects.with_or({ + # cfg(all(unix, not(target_os = "macos"))) + ( + "@rules_rust//rust/platform:aarch64-apple-ios", + "@rules_rust//rust/platform:aarch64-unknown-linux-gnu", + "@rules_rust//rust/platform:x86_64-apple-ios", + "@rules_rust//rust/platform:x86_64-unknown-linux-gnu", + ): [ + "@raze__openssl_probe__0_1_4//:openssl_probe", + ], + "//conditions:default": [], + }) + selects.with_or({ + # cfg(target_os = "macos") + ( + "@rules_rust//rust/platform:x86_64-apple-darwin", + ): [ + "@raze__security_framework__2_3_1//:security_framework", + ], + "//conditions:default": [], + }) + selects.with_or({ + # cfg(windows) + ( + "@rules_rust//rust/platform:x86_64-pc-windows-msvc", + ): [ + "@raze__schannel__0_1_19//:schannel", + ], + "//conditions:default": [], + }), +) + +# Unsupported target "compare_mozilla" with type "test" omitted + +# Unsupported target "smoketests" with type "test" omitted diff --git a/rslib/Cargo.toml b/rslib/Cargo.toml index 656b953ae..43436cd35 100644 --- a/rslib/Cargo.toml +++ b/rslib/Cargo.toml @@ -64,6 +64,7 @@ reqwest = { git = "https://github.com/ankitects/reqwest.git", rev = "7591444614d "native-tls", "rustls-tls", "rustls-tls-webpki-roots", + "rustls-tls-native-roots", ] } rusqlite = { version = "0.24.1", features = ["trace", "functions", "collation", "bundled"] } scopeguard = "1.1.0"