Skip to content

Commit

Permalink
feat(rust): unified rust-aes feature into rust-crypto
Browse files Browse the repository at this point in the history
  • Loading branch information
davide-baldo committed Apr 30, 2024
1 parent 3e95cae commit ae778bc
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-draft-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ jobs:
if [[ '${{ matrix.job.use-cross }}' == 'true' ]]; then
# When building using cross use rust crypto (slower) since the cross image doesn't have an up-to-date libclang
cross build --target ${{ matrix.job.target }} -p ockam_rust_elixir_nifs --release --no-default-features -F rust-aes
cross build --target ${{ matrix.job.target }} -p ockam_rust_elixir_nifs --release --no-default-features -F rust-crypto
exit
fi
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion implementations/rust/ockam/ockam/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ OCKAM_XX_25519_AES256_GCM_SHA256 = ["ockam_identity/OCKAM_XX_25519_AES256_GCM_SH
OCKAM_XX_25519_AES128_GCM_SHA256 = ["ockam_identity/OCKAM_XX_25519_AES128_GCM_SHA256"]
OCKAM_XX_25519_ChaChaPolyBLAKE2s = ["ockam_identity/OCKAM_XX_25519_ChaChaPolyBLAKE2s"]
aws-lc = ["ockam_vault?/aws-lc", "ockam_transport_tcp?/aws-lc", "ockam_identity/aws-lc"]
rust-crypto = ["ockam_vault?/rust-aes", "ockam_transport_tcp?/ring", "ockam_identity/rust-aes"]
rust-crypto = ["ockam_vault?/rust-crypto", "ockam_transport_tcp?/ring", "ockam_identity/rust-crypto"]

# Feature (enabled by default): "std" enables functionality expected to
# be available on a standard platform.
Expand Down
1 change: 1 addition & 0 deletions implementations/rust/ockam/ockam_abac/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ tracing = { version = "0.1", default-features = false, features = ["attributes"]
wast = { version = "206.0.0", default-features = false, optional = true }

[dev-dependencies]
ockam_vault = { path = "../ockam_vault", default-features = false, features = ["rust-crypto"] }
quickcheck = "1.0.3"
rand = "0.8.5"
tempfile = "3.10.1"
Expand Down
2 changes: 1 addition & 1 deletion implementations/rust/ockam/ockam_api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ std = [
]
storage = ["ockam/storage"]
aws-lc = ["ockam_vault/aws-lc", "ockam_transport_tcp/aws-lc"]
rust-crypto = ["ockam_vault/rust-aes", "ockam_transport_tcp/ring"]
rust-crypto = ["ockam_vault/rust-crypto", "ockam_transport_tcp/ring"]

[dependencies]
aws-config = { version = "1.2.1", default-features = false, features = ["rustls"] }
Expand Down
2 changes: 1 addition & 1 deletion implementations/rust/ockam/ockam_command/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,4 @@ time = { version = "0.3", default-features = false, features = ["std", "local-of
default = ["orchestrator", "rust-crypto"]
orchestrator = []
aws-lc = ["ockam_vault/aws-lc", "ockam_transport_tcp/aws-lc", "ockam_api/aws-lc"]
rust-crypto = ["ockam_vault/rust-aes", "ockam_transport_tcp/ring", "ockam_api/rust-crypto"]
rust-crypto = ["ockam_vault/rust-crypto", "ockam_transport_tcp/ring", "ockam_api/rust-crypto"]
4 changes: 2 additions & 2 deletions implementations/rust/ockam/ockam_identity/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ and trustfully with cloud services and other devices.
"""

[features]
default = ["std", "software_vault", "rust-aes"]
default = ["std", "software_vault", "rust-crypto"]
software_vault = ["ockam_vault"]
lease_proto_json = ["serde_json"]
OCKAM_XX_25519_AES256_GCM_SHA256 = [
Expand Down Expand Up @@ -70,7 +70,7 @@ alloc = [

storage = ["ockam_vault/storage", "sqlx", "tokio-retry"]
aws-lc = ["ockam_vault?/aws-lc"]
rust-aes = ["ockam_vault?/rust-aes"]
rust-crypto = ["ockam_vault?/rust-crypto"]

[dependencies]
async-trait = "0.1.80"
Expand Down
4 changes: 2 additions & 2 deletions implementations/rust/ockam/ockam_rust_elixir_nifs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ crate-type = ["cdylib"]
path = "src/lib.rs"

[features]
default = ["rust-aes"]
default = ["rust-crypto"]
aws-lc = ["ockam_vault/aws-lc"]
rust-aes = ["ockam_vault/rust-aes"]
rust-crypto = ["ockam_vault/rust-crypto"]

[dependencies]
hex = { version = "0.4", default-features = false }
Expand Down
4 changes: 2 additions & 2 deletions implementations/rust/ockam/ockam_vault/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ crate-type = ["rlib"]
path = "src/lib.rs"

[features]
default = ["std", "storage", "rust-aes"]
default = ["std", "storage", "rust-crypto"]
disable_default_noise_protocol = []
OCKAM_XX_25519_AES256_GCM_SHA256 = []
OCKAM_XX_25519_AES128_GCM_SHA256 = []
OCKAM_XX_25519_ChaChaPolyBLAKE2s = []
aws-lc = ["dep:aws-lc-rs"]
rust-aes = ["dep:aes-gcm"]
rust-crypto = ["dep:aes-gcm"]

# Feature (enabled by default): "std" enables functionality expected to
# be available on a standard platform.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use cfg_if::cfg_if;

#[cfg(not(any(feature = "aws-lc", feature = "rust-aes",)))]
compile_error! {"One feature must be enabled: \"aws-lc\" or \"rust-aes\""}
#[cfg(not(any(feature = "aws-lc", feature = "rust-crypto",)))]
compile_error! {"One feature must be enabled: \"aws-lc\" or \"rust-crypto\""}

#[cfg(any(
feature = "OCKAM_XX_25519_AES128_GCM_SHA256",
Expand Down
4 changes: 2 additions & 2 deletions implementations/rust/ockam/ockam_vault_aws/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ crate-type = ["rlib"]
path = "src/lib.rs"

[features]
default = ["std", "rust-aes"]
default = ["std", "rust-crypto"]

# Feature (enabled by default): "std" enables functionality expected to
# be available on a standard platform.
Expand Down Expand Up @@ -53,7 +53,7 @@ alloc = ["ockam_core/alloc", "ockam_node/alloc", "ockam_vault/alloc"]
# Feature: "credentials-sso" enables support for sso on aws-config
credentials-sso = ["aws-config/sso"]
aws-lc = ["ockam_vault/aws-lc"]
rust-aes = ["ockam_vault/rust-aes"]
rust-crypto = ["ockam_vault/rust-crypto"]

[dependencies]
aws-config = { version = "1.2.1", default-features = false, features = ["rustls", "rt-tokio"] }
Expand Down

0 comments on commit ae778bc

Please sign in to comment.