Skip to content

Commit

Permalink
Make bls12_381_plus dependency more flexible again (#1393)
Browse files Browse the repository at this point in the history
* update `bls12_381_plus` dependency

- making version range more flexible again

* fix clippy warning

* fix clippy warning

* fix clippy warnings

* remove undefined feature check

* bump depdendency version for `iota-crypto`

* bump dependency version of bls12_381_plus in wasm bindings

* update sandbox ci action to use 'docker compose' instead of 'docker-compose'

* update step name to match latest updates
  • Loading branch information
wulfraem authored Sep 2, 2024
1 parent 842f483 commit b355b47
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ jobs:
run: cargo clean

# Build the library, tests, and examples without running them to avoid recompilation in the run tests step
- name: Build with all features
- name: Build with default features
run: cargo build --workspace --tests --examples --release

- name: Start iota sandbox
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ members = [
exclude = ["bindings/wasm", "bindings/grpc"]

[workspace.dependencies]
bls12_381_plus = { version = "=0.8.15" }
bls12_381_plus = { version = "0.8.17" }
serde = { version = "1.0", default-features = false, features = ["alloc", "derive"] }
thiserror = { version = "1.0", default-features = false }
strum = { version = "0.25", default-features = false, features = ["std", "derive"] }
Expand Down
2 changes: 1 addition & 1 deletion bindings/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ crate-type = ["cdylib", "rlib"]

[dependencies]
async-trait = { version = "0.1", default-features = false }
bls12_381_plus = "=0.8.15"
bls12_381_plus = "0.8.17"
console_error_panic_hook = { version = "0.1" }
futures = { version = "0.3" }
identity_eddsa_verifier = { path = "../../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
Expand Down
2 changes: 1 addition & 1 deletion identity_credential/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ zkryptium = { workspace = true, optional = true }
[dev-dependencies]
anyhow = "1.0.62"
identity_eddsa_verifier = { path = "../identity_eddsa_verifier", default-features = false, features = ["ed25519"] }
iota-crypto = { version = "0.23", default-features = false, features = ["ed25519", "std", "random"] }
iota-crypto = { version = "0.23.2", default-features = false, features = ["ed25519", "std", "random"] }
proptest = { version = "1.4.0", default-features = false, features = ["std"] }
tokio = { version = "1.35.0", default-features = false, features = ["rt-multi-thread", "macros"] }

Expand Down
2 changes: 1 addition & 1 deletion identity_eddsa_verifier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description = "JWS EdDSA signature verification for IOTA Identity"

[dependencies]
identity_jose = { version = "=1.3.1", path = "../identity_jose", default-features = false }
iota-crypto = { version = "0.23", default-features = false, features = ["std"] }
iota-crypto = { version = "0.23.2", default-features = false, features = ["std"] }

[features]
ed25519 = ["iota-crypto/ed25519"]
Expand Down
2 changes: 1 addition & 1 deletion identity_iota_core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ thiserror.workspace = true

[dev-dependencies]
anyhow = { version = "1.0.57" }
iota-crypto = { version = "0.23", default-features = false, features = ["bip39", "bip39-en"] }
iota-crypto = { version = "0.23.2", default-features = false, features = ["bip39", "bip39-en"] }
proptest = { version = "1.0.0", default-features = false, features = ["std"] }
tokio = { version = "1.29.0", default-features = false, features = ["rt-multi-thread", "macros"] }

Expand Down
4 changes: 2 additions & 2 deletions identity_jose/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ description = "A library for JOSE (JSON Object Signing and Encryption)"
[dependencies]
bls12_381_plus.workspace = true
identity_core = { version = "=1.3.1", path = "../identity_core", default-features = false }
iota-crypto = { version = "0.23", default-features = false, features = ["std", "sha"] }
iota-crypto = { version = "0.23.2", default-features = false, features = ["std", "sha"] }
json-proof-token.workspace = true
serde.workspace = true
serde_json = { version = "1.0", default-features = false, features = ["std"] }
Expand All @@ -24,7 +24,7 @@ zeroize = { version = "1.6", default-features = false, features = ["std", "zeroi

[dev-dependencies]
anyhow = "1"
iota-crypto = { version = "0.23", features = ["ed25519", "random", "hmac"] }
iota-crypto = { version = "0.23.2", features = ["ed25519", "random", "hmac"] }
p256 = { version = "0.12.0", default-features = false, features = ["std", "ecdsa", "ecdsa-core"] }
signature = { version = "2", default-features = false }

Expand Down
5 changes: 3 additions & 2 deletions identity_jose/src/tests/rfc8037.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ fn test_rfc8037_ed25519() {
.and_then(|decoded| decoded.verify(&jws_verifier, &public))
.unwrap();

assert_eq!(token.protected, header);
assert_eq!(token.claims, tv.payload.as_bytes());

let jws_signature_verifier = JwsVerifierFn::from(|input: VerificationInput, key: &Jwk| match input.alg {
JwsAlgorithm::EdDSA => ed25519::verify(input, key),
other => unimplemented!("{other}"),
Expand All @@ -62,7 +65,5 @@ fn test_rfc8037_ed25519() {
.unwrap();

assert_eq!(token, token_with_default);
assert_eq!(token.protected, header);
assert_eq!(token.claims, tv.payload.as_bytes());
}
}
2 changes: 1 addition & 1 deletion identity_storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ identity_did = { version = "=1.3.1", path = "../identity_did", default-features
identity_document = { version = "=1.3.1", path = "../identity_document", default-features = false }
identity_iota_core = { version = "=1.3.1", path = "../identity_iota_core", default-features = false, optional = true }
identity_verification = { version = "=1.3.1", path = "../identity_verification", default-features = false }
iota-crypto = { version = "0.23", default-features = false, features = ["ed25519", "random"], optional = true }
iota-crypto = { version = "0.23.2", default-features = false, features = ["ed25519", "random"], optional = true }
json-proof-token = { workspace = true, optional = true }
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"], optional = true }
seahash = { version = "4.1.0", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion identity_stronghold/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async-trait = { version = "0.1.64", default-features = false }
bls12_381_plus = { workspace = true, optional = true }
identity_storage = { version = "=1.3.1", path = "../identity_storage", default-features = false }
identity_verification = { version = "=1.3.1", path = "../identity_verification", default-features = false }
iota-crypto = { version = "0.23", default-features = false, features = ["ed25519"] }
iota-crypto = { version = "0.23.2", default-features = false, features = ["ed25519"] }
iota-sdk = { version = "1.1.5", default-features = false, features = ["client", "stronghold"] }
iota_stronghold = { version = "2.1.0", default-features = false }
json-proof-token = { workspace = true, optional = true }
Expand Down

0 comments on commit b355b47

Please sign in to comment.