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 (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 <eugkoira@amazon.com>
  • Loading branch information
eugkoira committed Apr 18, 2024
1 parent 5de74a5 commit b12ed3a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
11 changes: 6 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.20", optional = true }
tokio = { version = "1.20", features = ["rt", "macros"], optional = true }

[dependencies.serde]
Expand All @@ -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"]
9 changes: 5 additions & 4 deletions src/sign.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(|| {
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 b12ed3a

Please sign in to comment.