Skip to content

Commit 58a4935

Browse files
authored
Merge pull request #2260 from input-output-hk/djo/2252/use-tls-vendored-from-reqwest
Supersede openssl bundling with `native-tls-vendored` from `reqwest`
2 parents 573021d + 4a29b51 commit 58a4935

File tree

13 files changed

+25
-42
lines changed

13 files changed

+25
-42
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ jobs:
3333
# We separate the build in 2 steps as we want to avoid side effects with Rust feature unification.
3434
- name: Cargo build - Tooling
3535
shell: bash
36-
run: cargo build --release --bin mithril-end-to-end --bin load-aggregator
36+
run: cargo build --release --bin mithril-end-to-end --bin load-aggregator --features bundle_tls
3737

3838
- name: Build Mithril workspace & publish artifacts
3939
uses: ./.github/workflows/actions/build-upload-mithril-artifact
4040
with:
41-
binaries-build-args: --bin mithril-aggregator --bin mithril-signer --bin mithril-client --bin mithril-relay --features bundle_openssl,full
41+
binaries-build-args: --bin mithril-aggregator --bin mithril-signer --bin mithril-client --bin mithril-relay --features bundle_tls,full
4242
libraries-build-args: --package mithril-stm --package mithril-client --features full,unstable
4343

4444
- name: Build Debian packages
@@ -81,15 +81,15 @@ jobs:
8181
include:
8282
# Only build client on windows & mac
8383
- os: macos-14
84-
binaries-build-args: --bin mithril-client --features bundle_openssl
84+
binaries-build-args: --bin mithril-client --features bundle_tls
8585
libraries-build-args: --package mithril-stm --package mithril-client --features full,unstable
8686
- os: macos-14-large
87-
binaries-build-args: --bin mithril-client --features bundle_openssl
87+
binaries-build-args: --bin mithril-client --features bundle_tls
8888
libraries-build-args: --package mithril-stm --package mithril-client --features full,unstable
8989
- os: windows-latest
9090
# Use `--bins --package <package>` instead of `--bin <package>`, otherwise the 'windows' compatibility
9191
# hack in mithril common cargo.toml doesn't apply (we have no idea why).
92-
binaries-build-args: --bins --package mithril-client-cli --features bundle_openssl
92+
binaries-build-args: --bins --package mithril-client-cli --features bundle_tls
9393
libraries-build-args: --package mithril-stm --package mithril-client --no-default-features --features num-integer-backend,full,unstable
9494
runs-on: ${{ matrix.os }}
9595

Cargo.lock

Lines changed: 5 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

mithril-aggregator/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-aggregator"
3-
version = "0.6.22"
3+
version = "0.6.23"
44
description = "A Mithril Aggregator server"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -30,8 +30,6 @@ mithril-common = { path = "../mithril-common", features = ["full"] }
3030
mithril-doc = { path = "../internal/mithril-doc" }
3131
mithril-metric = { path = "../internal/mithril-metric" }
3232
mithril-persistence = { path = "../internal/mithril-persistence" }
33-
openssl = { version = "0.10.68", features = ["vendored"], optional = true }
34-
openssl-probe = { version = "0.1.5", optional = true }
3533
paste = "1.0.15"
3634
prometheus = "0.13.4"
3735
rayon = "1.10.0"
@@ -80,5 +78,5 @@ tempfile = "3.14.0"
8078
[features]
8179
default = ["jemallocator"]
8280

83-
bundle_openssl = ["dep:openssl", "dep:openssl-probe"]
81+
bundle_tls = ["reqwest/native-tls-vendored"]
8482
jemallocator = ["dep:tikv-jemallocator"]

mithril-aggregator/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CARGO = cargo
55
all: test build
66

77
build:
8-
${CARGO} build --release --features bundle_openssl
8+
${CARGO} build
99
cp ../target/release/mithril-aggregator .
1010

1111
run: build

mithril-aggregator/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,5 @@ async fn main() -> StdResult<()> {
3434
let args = MainOpts::parse();
3535
let root_logger = build_logger(&args);
3636

37-
#[cfg(feature = "bundle_openssl")]
38-
openssl_probe::init_ssl_cert_env_vars();
39-
4037
args.execute(root_logger).await
4138
}

mithril-client-cli/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-client-cli"
3-
version = "0.10.7"
3+
version = "0.10.8"
44
description = "A Mithril Client"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -34,8 +34,6 @@ human_bytes = { version = "0.4.3", features = ["fast"] }
3434
indicatif = { version = "0.17.9", features = ["tokio"] }
3535
mithril-client = { path = "../mithril-client", features = ["fs", "unstable"] }
3636
mithril-doc = { path = "../internal/mithril-doc" }
37-
openssl = { version = "0.10.68", features = ["vendored"], optional = true }
38-
openssl-probe = { version = "0.1.5", optional = true }
3937
serde = { version = "1.0.217", features = ["derive"] }
4038
serde_json = "1.0.134"
4139
slog = { version = "2.7.0", features = [
@@ -52,4 +50,4 @@ tokio = { version = "1.42.0", features = ["full"] }
5250
mithril-common = { path = "../mithril-common", features = ["test_tools"] }
5351

5452
[features]
55-
bundle_openssl = ["dep:openssl", "dep:openssl-probe"]
53+
bundle_tls = ["mithril-client/native-tls-vendored"]

mithril-client-cli/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ CARGO = cargo
1010
all: test build
1111

1212
build:
13-
${CARGO} build --release --features bundle_openssl
13+
${CARGO} build
1414
cp ../target/release/mithril-client .
1515

1616
run: build

mithril-client-cli/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,5 @@ async fn main() -> MithrilResult<()> {
244244
});
245245
let logger = args.build_logger()?;
246246

247-
#[cfg(feature = "bundle_openssl")]
248-
openssl_probe::init_ssl_cert_env_vars();
249-
250247
args.execute(logger).await
251248
}

mithril-relay/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-relay"
3-
version = "0.1.31"
3+
version = "0.1.32"
44
description = "A Mithril relay"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -50,3 +50,6 @@ warp = "0.3.7"
5050
[dev-dependencies]
5151
slog-scope = "4.4.0"
5252
slog-term = "2.9.1"
53+
54+
[features]
55+
bundle_tls = ["reqwest/native-tls-vendored"]

mithril-signer/Cargo.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-signer"
3-
version = "0.2.224"
3+
version = "0.2.225"
44
description = "A Mithril Signer"
55
authors = { workspace = true }
66
edition = { workspace = true }
@@ -25,8 +25,6 @@ mithril-common = { path = "../mithril-common", features = ["full"] }
2525
mithril-doc = { path = "../internal/mithril-doc" }
2626
mithril-metric = { path = "../internal/mithril-metric" }
2727
mithril-persistence = { path = "../internal/mithril-persistence" }
28-
openssl = { version = "0.10.68", features = ["vendored"], optional = true }
29-
openssl-probe = { version = "0.1.5", optional = true }
3028
paste = "1.0.15"
3129
prometheus = "0.13.4"
3230
rand_chacha = "0.3.1"
@@ -60,5 +58,5 @@ slog-term = "2.9.1"
6058
[features]
6159
default = ["jemallocator"]
6260

63-
bundle_openssl = ["dep:openssl", "dep:openssl-probe"]
61+
bundle_tls = ["reqwest/native-tls-vendored"]
6462
jemallocator = ["dep:tikv-jemallocator"]

mithril-signer/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ CARGO = cargo
55
all: test build
66

77
build:
8-
${CARGO} build --release --features bundle_openssl
8+
${CARGO} build --release
99
cp ../target/release/mithril-signer .
1010

1111
run: build

mithril-signer/src/main.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ async fn main() -> StdResult<()> {
136136
.map_err(|message| anyhow!(message));
137137
}
138138

139-
#[cfg(feature = "bundle_openssl")]
140-
openssl_probe::init_ssl_cert_env_vars();
141-
142139
debug!(root_logger, "Starting"; "node_version" => env!("CARGO_PKG_VERSION"));
143140

144141
// Load config

mithril-test-lab/mithril-end-to-end/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mithril-end-to-end"
3-
version = "0.4.64"
3+
version = "0.4.65"
44
authors = { workspace = true }
55
edition = { workspace = true }
66
documentation = { workspace = true }
@@ -42,3 +42,4 @@ tokio-util = { version = "0.7.13", features = ["codec"] }
4242
[features]
4343
default = []
4444
allow_skip_signer_certification = []
45+
bundle_tls = ["reqwest/native-tls-vendored"]

0 commit comments

Comments
 (0)