Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Add openssl tls backend for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
bytedream committed Jul 20, 2023
1 parent 4ec9a0d commit dc6bc0d
Show file tree
Hide file tree
Showing 5 changed files with 221 additions and 41 deletions.
18 changes: 15 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ authors = ["Crunchy Labs Maintainers"]
version = "3.0.0-dev.14"
edition = "2021"

[features]
default = ["openssl-static"]

openssl = ["crunchy-cli-core/openssl"]
openssl-static = ["crunchy-cli-core/openssl-static"]

[dependencies]
tokio = { version = "1.29", features = ["macros", "rt-multi-thread", "time"], default-features = false }

Expand Down
179 changes: 179 additions & 0 deletions crunchy-cli-core/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions crunchy-cli-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ authors = ["Crunchy Labs Maintainers"]
version = "3.0.0-dev.14"
edition = "2021"

[features]
openssl = ["dep:native-tls", "reqwest/native-tls"]
openssl-static = ["dep:native-tls", "native-tls?/vendored", "reqwest/native-tls-vendored"]

[dependencies]
anyhow = "1.0"
async-trait = "0.1"
Expand All @@ -30,11 +34,9 @@ tempfile = "3.6"
tokio = { version = "1.29", features = ["macros", "rt-multi-thread", "time"] }
sys-locale = "0.3"

[target.'cfg(target_os = "linux")'.dependencies]
reqwest = { version = "0.11", default-features = false, features = ["socks", "native-tls-alpn", "native-tls-vendored"] }

[target.'cfg(not(target_os = "linux"))'.dependencies]
reqwest = { version = "0.11", default-features = false, features = ["socks"] }
# fork of the `native-tls` crate which uses openssl as backend on every platform. this is done as `reqwest` only supports
# `rustls` and `native-tls` as tls backend
native-tls = { git = "https://github.com/crunchy-labs/rust-not-so-native-tls.git", optional = true }

[build-dependencies]
chrono = "0.4"
Loading

0 comments on commit dc6bc0d

Please sign in to comment.