Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
* Bump tss-esapi to the latest version to get rid of dependencies conflicts with KMS SDK
  (More details in parallaxsecond/rust-tss-esapi#519)
* Bump AWS SDK dependencies to their latest versions
* Move aws-config to dev-dependencies because it's used only in tests
* Bump the crate version itself

Signed-off-by: Eugene Koira <eugkoira@amazon.com>
  • Loading branch information
eugkoira committed Apr 16, 2024
1 parent d46776c commit 82ceb1c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "aws-nitro-enclaves-cose"
version = "0.5.1"
version = "0.5.2"
authors = ["Petre Eftime <epetre@amazon.com>"]
edition = "2018"
license = "Apache-2.0"
Expand All @@ -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.21", optional = true }
tokio = { version = "1.20", features = ["rt", "macros"], optional = true }

[dependencies.serde]
Expand All @@ -27,9 +26,10 @@ features = ["derive"]

[dev-dependencies]
hex = "0.4"
aws-config = { 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"]
9 changes: 5 additions & 4 deletions src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,10 +1313,11 @@ mod tests {
};

use std::env;
use aws_config::BehaviorVersion;

#[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(|| {
Expand Down Expand Up @@ -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(|| {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit 82ceb1c

Please sign in to comment.