From b12ed3a556982e89af6137824ea0530ce84e2734 Mon Sep 17 00:00:00 2001 From: Eugene Koira Date: Tue, 16 Apr 2024 14:45:26 +0000 Subject: [PATCH] Update dependencies * Bump tss-esapi to the latest version to get rid of dependencies conflicts with KMS SDK (More details in https://github.com/parallaxsecond/rust-tss-esapi/issues/519) * Bump AWS SDK dependencies to their latest versions (within possible MSRV=1.68.2) * Move aws-config to dev-dependencies because it's used only in tests * Bump the crate version itself Signed-off-by: Eugene Koira --- Cargo.toml | 11 ++++++----- src/sign.rs | 9 +++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d82354c..62f39d1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "aws-nitro-enclaves-cose" -version = "0.5.1" +version = "0.5.2" authors = ["Petre Eftime "] edition = "2018" license = "Apache-2.0" @@ -16,9 +16,8 @@ serde_repr = "0.1" serde_bytes = { version = "0.11", features = ["std"] } serde_with = { version = "3.3" } openssl = { version = "0.10", optional = true } -tss-esapi = { version = "7.4", optional = true } -aws-config = { version = "0.56", optional = true } -aws-sdk-kms = { version = "0.31", optional = true } +tss-esapi = { version = "7.5.1", optional = true } +aws-sdk-kms = { version = "<=1.20", optional = true } tokio = { version = "1.20", features = ["rt", "macros"], optional = true } [dependencies.serde] @@ -27,9 +26,11 @@ features = ["derive"] [dev-dependencies] hex = "0.4" +aws-config = { version = "<=1.1" } +aws-smithy-runtime = { version = "<=1.2" } [features] default = ["key_openssl_pkey"] key_openssl_pkey = ["openssl"] key_tpm = ["tss-esapi", "openssl"] -key_kms = ["aws-config", "aws-sdk-kms", "tokio", "key_openssl_pkey"] +key_kms = ["aws-sdk-kms", "tokio", "key_openssl_pkey"] diff --git a/src/sign.rs b/src/sign.rs index 5c52d19..12aa74d 100644 --- a/src/sign.rs +++ b/src/sign.rs @@ -1312,11 +1312,12 @@ mod tests { sign::*, }; + use aws_config::BehaviorVersion; use std::env; #[tokio::test] async fn cose_sign_kms() { - let config = aws_config::from_env().load().await; + let config = aws_config::defaults(BehaviorVersion::latest()).load().await; let kms_client = aws_sdk_kms::Client::new(&config); tokio::task::spawn_blocking(|| { @@ -1350,7 +1351,7 @@ mod tests { #[tokio::test] async fn cose_sign_kms_invalid_signature() { - let config = aws_config::from_env().load().await; + let config = aws_config::defaults(BehaviorVersion::latest()).load().await; let kms_client = aws_sdk_kms::Client::new(&config); tokio::task::spawn_blocking(|| { @@ -1388,7 +1389,7 @@ mod tests { #[cfg(feature = "key_openssl_pkey")] #[tokio::test] async fn cose_sign_kms_public_key() { - let config = aws_config::from_env().load().await; + let config = aws_config::defaults(BehaviorVersion::latest()).load().await; let kms_client = aws_sdk_kms::Client::new(&config); let key_id = env::var("AWS_KMS_TEST_KEY_ARN").expect("Please set AWS_KMS_TEST_KEY_ARN"); @@ -1418,7 +1419,7 @@ mod tests { #[cfg(feature = "key_openssl_pkey")] #[tokio::test] async fn cose_sign_kms_public_key_invalid_signature() { - let config = aws_config::from_env().load().await; + let config = aws_config::defaults(BehaviorVersion::latest()).load().await; let kms_client = aws_sdk_kms::Client::new(&config); let key_id = env::var("AWS_KMS_TEST_KEY_ARN").expect("Please set AWS_KMS_TEST_KEY_ARN");