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

[PM-4269] Use rustls on non-wasm platforms #374

Merged
merged 12 commits into from
Jan 8, 2024
104 changes: 103 additions & 1 deletion Cargo.lock

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

1 change: 1 addition & 0 deletions crates/bitwarden-api-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ uuid = { version = ">=1.3.3, <2", features = ["serde"] }
[dependencies.reqwest]
version = ">=0.11.18, <0.12"
features = ["json", "multipart"]
default-features = false
dani-garcia marked this conversation as resolved.
Show resolved Hide resolved

[dev-dependencies]
1 change: 1 addition & 0 deletions crates/bitwarden-api-identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ uuid = { version = ">=1.3.3, <2", features = ["serde"] }
[dependencies.reqwest]
version = ">=0.11.18, <0.12"
features = ["json", "multipart"]
default-features = false

[dev-dependencies]
8 changes: 7 additions & 1 deletion crates/bitwarden-json/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ edition = "2021"
rust-version = "1.57"

[features]
default = ["use_native_tls"]

internal = ["bitwarden/internal"] # Internal testing methods
secrets = ["bitwarden/secrets"] # Secrets manager API

# TLS backend selection
use_native_tls = ["bitwarden/use_native_tls"]
use_rustls = ["bitwarden/use_rustls"]

[dependencies]
log = ">=0.4.18, <0.5"
schemars = ">=0.8.12, <0.9"
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"

bitwarden = { path = "../bitwarden" }
bitwarden = { path = "../bitwarden", default-features = false }
5 changes: 4 additions & 1 deletion crates/bitwarden-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ crate-type = ["cdylib"]
pyo3 = { version = "0.20.0", features = ["extension-module"] }
pyo3-log = "0.9.0"

bitwarden-json = { path = "../bitwarden-json", features = ["secrets"] }
bitwarden-json = { path = "../bitwarden-json", features = [
"secrets",
"use_rustls",
], default-features = false }

[build-dependencies]
pyo3-build-config = { version = "0.20.0" }
Expand Down
10 changes: 8 additions & 2 deletions crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ edition = "2021"
rust-version = "1.57"

[features]
default = ["secrets"]
default = ["secrets", "use_native_tls"]

secrets = [] # Secrets manager API
internal = [] # Internal testing methods
mobile = ["uniffi", "internal"] # Mobile-specific features

# TLS backend selection
use_native_tls = ["reqwest/native-tls"]
use_rustls = ["reqwest/rustls-tls"]
dani-garcia marked this conversation as resolved.
Show resolved Hide resolved

[dependencies]
aes = ">=0.8.2, <0.9"
argon2 = { version = ">=0.5.0, <0.6", features = [
Expand All @@ -43,7 +47,9 @@ num-bigint = ">=0.4, <0.5"
num-traits = ">=0.2.15, <0.3"
pbkdf2 = { version = ">=0.12.1, <0.13", default-features = false }
rand = ">=0.8.5, <0.9"
reqwest = { version = ">=0.11, <0.12", features = ["json"] }
reqwest = { version = ">=0.11, <0.12", features = [
"json",
], default-features = false }
rsa = ">=0.9.2, <0.10"
schemars = { version = ">=0.8, <0.9", features = ["uuid1", "chrono"] }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
Expand Down
Loading