Skip to content

Commit 9a9d84f

Browse files
committed
refactor: feature-gate openmls impls in obfuscate
This enables us to add a dependency to `obfuscate` from `rusty-jwt-tools` without a transitive openmls dependency.
1 parent 837a84c commit 9a9d84f

File tree

6 files changed

+14
-4
lines changed

6 files changed

+14
-4
lines changed

crypto-ffi/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ proteus-wasm = { workspace = true, optional = true }
3939
core-crypto-keystore.workspace = true
4040
core-crypto-macros.workspace = true
4141
core-crypto.workspace = true
42-
obfuscate.workspace = true
42+
obfuscate = { workspace = true, features = ["openmls"] }
4343
rmp-serde.workspace = true
4444
paste = "1.0.15"
4545
hex.workspace = true

crypto/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ core-crypto-keystore.workspace = true
6565
typed-builder.workspace = true
6666
core-crypto-macros.workspace = true
6767
rand.workspace = true
68-
obfuscate.workspace = true
68+
obfuscate = { workspace = true, features = ["openmls"] }
6969

7070
[target.'cfg(not(target_family = "wasm"))'.dependencies]
7171
async-fs = { version = "2.2", optional = true }

keystore/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ serde_json.workspace = true
3838
core-crypto-macros.workspace = true
3939
rand = { workspace = true, features = ["getrandom"] }
4040
getrandom = { version = "0.2", features = ["js"] }
41-
obfuscate = { workspace = true }
41+
obfuscate = { workspace = true, features = ["openmls"] }
4242
openmls_traits = { workspace = true }
4343
openmls_basic_credential = { workspace = true }
4444
openmls_x509_credential = { workspace = true }

obfuscate/Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ rust-version = "1.90"
77
[dependencies]
88
hex.workspace = true
99
sha2.workspace = true
10-
openmls.workspace = true
10+
openmls = { workspace = true, optional = true }
1111
derive_more.workspace = true
1212
rand.workspace = true
1313
log.workspace = true
1414

1515
[lints]
1616
workspace = true
17+
18+
[features]
19+
default = []

obfuscate/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22

33
Defines an `Obfuscate` trait with implementations for external types and a wrapper type for usage during debug logging.
44
Used by `#[sensitive]` fields of structs deriving `crypto_macros::Debug`.
5+
6+
## Cargo Features
7+
8+
No features are included in the default set.
9+
10+
- `openmls`: implements `Obfuscate` for some openmls types.

obfuscate/src/impls/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
#[cfg(feature = "openmls")]
12
pub mod openmls;
23
pub mod std;

0 commit comments

Comments
 (0)