Skip to content

Commit

Permalink
Add feature flag for RustTLS support
Browse files Browse the repository at this point in the history
  • Loading branch information
dani-garcia committed Nov 20, 2023
1 parent 27045bf commit ebd103e
Show file tree
Hide file tree
Showing 8 changed files with 119 additions and 13 deletions.
106 changes: 103 additions & 3 deletions 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", features = ["serde"] }
[dependencies.reqwest]
version = "^0.11.18"
features = ["json", "multipart"]
default-features = false

[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", features = ["serde"] }
[dependencies.reqwest]
version = "^0.11.18"
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

use_native_tls = ["bitwarden/use_native_tls"]
use_native_tls_vendored = ["bitwarden/use_native_tls_vendored"]
use_rustls = ["bitwarden/use_rustls"]

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

bitwarden = { path = "../bitwarden" }
bitwarden = { path = "../bitwarden", default-features = false }
2 changes: 1 addition & 1 deletion crates/bitwarden-py/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ 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
3 changes: 0 additions & 3 deletions crates/bitwarden-uniffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,3 @@ bitwarden = { path = "../bitwarden", features = ["mobile", "internal"] }

[build-dependencies]
uniffi = { version = "=0.25.1", features = ["build"] }

[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }
8 changes: 6 additions & 2 deletions crates/bitwarden/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,20 @@ 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

use_native_tls = ["reqwest/native-tls"]
use_native_tls_vendored = ["reqwest/native-tls-vendored"]
use_rustls = ["reqwest/rustls-tls"]

[dependencies]
base64 = ">=0.21.2, <0.22"
lazy_static = ">=1.4.0, <2.0"
reqwest = { version = ">=0.11, <0.12", features = ["json"] }
reqwest = { version = ">=0.11, <0.12", features = ["json"], default-features = false }
serde = { version = ">=1.0, <2.0", features = ["derive"] }
serde_json = ">=1.0.96, <2.0"
serde_qs = ">=0.12.0, <0.13"
Expand Down
3 changes: 0 additions & 3 deletions crates/bws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,3 @@ bitwarden = { path = "../bitwarden", version = "0.3.1", features = ["secrets"] }

[dev-dependencies]
tempfile = "3.5.0"

[target.'cfg(target_os = "linux")'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }

0 comments on commit ebd103e

Please sign in to comment.