Skip to content

Commit

Permalink
Merge pull request #610 from jpculp/update-rust-deps
Browse files Browse the repository at this point in the history
Update rust dependencies (including AWS SDK)
  • Loading branch information
jpculp authored Jun 8, 2023
2 parents f6b7053 + 90a5d28 commit 2b9575f
Show file tree
Hide file tree
Showing 11 changed files with 406 additions and 385 deletions.
730 changes: 371 additions & 359 deletions Cargo.lock

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,22 @@ multiple-versions = "deny"
wildcards = "deny"

skip = [
# clap 3.x is using an old version of hermit-abi
{ name = "hermit-abi", version = "=0.1.19" }
# num_cpus and clap is using old versions of hermit-abi
{ name = "hermit-abi" },
# pem and using an old version of base64
{ name = "base64", version = "=0.13.1" },
# globset is using an old version of aho-corasick
{ name = "aho-corasick", version = "=0.7.20" },
# clap and other crates use an old version of syn
{ name = "syn", version = "=1" },
]

skip-tree = [
# windows-sys is not a direct dependency. mio and schannel
# are using different versions of windows-sys. we skip the
# dependency tree because windows-sys has many sub-crates
# that differ in major version.
{ name = "windows-sys", version = "=0.42.0" },
{ name = "windows-sys", version = "=0.42" },
]

[sources]
Expand Down
8 changes: 4 additions & 4 deletions tough-kms/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ aws-sdk-rust-rustls = ["aws-config/rustls", "aws-sdk-kms/rustls"]
[dependencies]
tough = { version = "0.13", path = "../tough", features = ["http"] }
ring = { version = "0.16", features = ["std"] }
aws-sdk-kms = "0.24"
aws-config = "0.54"
aws-sdk-kms = "0.28"
aws-config = "0.55"
snafu = { version = "0.7", features = ["backtraces-impl-backtrace-crate"] }
tokio = { version = "1", features = ["fs", "io-util", "time", "macros", "rt-multi-thread"] }
pem = "1"

[dev-dependencies]
aws-smithy-client = {version = "0.54", features = ["test-util"]}
aws-smithy-http = "0.54"
aws-smithy-client = {version = "0.55", features = ["test-util"]}
aws-smithy-http = "0.55"
base64 = "0.13"
bytes = "1"
http = "0.2"
Expand Down
5 changes: 3 additions & 2 deletions tough-kms/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ pub enum Error {
KmsGetPublicKey {
profile: Option<String>,
key_id: String,
source: aws_sdk_kms::types::SdkError<aws_sdk_kms::error::GetPublicKeyError>,
source:
aws_sdk_kms::error::SdkError<aws_sdk_kms::operation::get_public_key::GetPublicKeyError>,
backtrace: Backtrace,
},

Expand All @@ -53,7 +54,7 @@ pub enum Error {
KmsSignMessage {
key_id: String,
profile: Option<String>,
source: aws_sdk_kms::types::SdkError<aws_sdk_kms::error::SignError>,
source: aws_sdk_kms::error::SdkError<aws_sdk_kms::operation::sign::SignError>,
backtrace: Backtrace,
},

Expand Down
8 changes: 4 additions & 4 deletions tough-kms/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

mod client;
pub mod error;
use aws_sdk_kms::types::Blob;
use aws_sdk_kms::primitives::Blob;
use aws_sdk_kms::Client as KmsClient;
use ring::digest::{digest, SHA256};
use ring::rand::SecureRandom;
Expand All @@ -43,12 +43,12 @@ pub enum KmsSigningAlgorithm {
}

impl KmsSigningAlgorithm {
fn value(self) -> aws_sdk_kms::model::SigningAlgorithmSpec {
fn value(self) -> aws_sdk_kms::types::SigningAlgorithmSpec {
// Currently we are supporting only single algorithm, but code stub is added to support
// multiple algorithms in future.
match self {
KmsSigningAlgorithm::RsassaPssSha256 => {
aws_sdk_kms::model::SigningAlgorithmSpec::RsassaPssSha256
aws_sdk_kms::types::SigningAlgorithmSpec::RsassaPssSha256
}
}
}
Expand Down Expand Up @@ -194,7 +194,7 @@ impl Sign for KmsRsaKey {
.sign()
.key_id(self.key_id.clone())
.message(blob)
.message_type(aws_sdk_kms::model::MessageType::Digest)
.message_type(aws_sdk_kms::types::MessageType::Digest)
.signing_algorithm(self.signing_algorithm.value())
.send();

Expand Down
7 changes: 4 additions & 3 deletions tough-kms/tests/test_utils.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT OR Apache-2.0

use aws_sdk_kms::{Client, Config, Credentials};
use aws_sdk_kms::config::{Credentials, Region};
use aws_sdk_kms::{Client, Config};
use aws_smithy_client::erase::DynConnector;
use aws_smithy_client::test_connection::TestConnection;
use aws_smithy_http::body::SdkBody;
Expand Down Expand Up @@ -50,7 +51,7 @@ pub fn mock_client(data_files: Vec<&str>) -> Client {

let conf = Config::builder()
.credentials_provider(creds)
.region(aws_sdk_kms::Region::new("us-east-1"))
.region(Region::new("us-east-1"))
.http_connector(conn)
.build();

Expand Down Expand Up @@ -85,7 +86,7 @@ pub fn mock_client_with_status(status: u16) -> Client {

let conf = aws_sdk_kms::Config::builder()
.credentials_provider(creds)
.region(aws_sdk_kms::Region::new("us-east-1"))
.region(Region::new("us-east-1"))
.http_connector(conn)
.build();

Expand Down
4 changes: 2 additions & 2 deletions tough-ssm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ aws-sdk-rust-rustls = ["aws-config/rustls", "aws-sdk-ssm/rustls"]

[dependencies]
tough = { version = "0.13", path = "../tough", features = ["http"] }
aws-sdk-ssm = "0.24"
aws-config = "0.54"
aws-sdk-ssm = "0.28"
aws-config = "0.55"
serde = "1"
serde_json = "1"
snafu = { version = "0.7", features = ["backtraces-impl-backtrace-crate"] }
Expand Down
7 changes: 4 additions & 3 deletions tough-ssm/src/error.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: MIT OR Apache-2.0

use aws_sdk_ssm::error::{GetParameterError, PutParameterError};
use snafu::{Backtrace, Snafu};

pub type Result<T> = std::result::Result<T, Error>;
Expand Down Expand Up @@ -35,7 +34,8 @@ pub enum Error {
SsmGetParameter {
profile: Option<String>,
parameter_name: String,
source: aws_sdk_ssm::types::SdkError<GetParameterError>,
source:
aws_sdk_ssm::error::SdkError<aws_sdk_ssm::operation::get_parameter::GetParameterError>,
backtrace: Backtrace,
},

Expand All @@ -59,7 +59,8 @@ pub enum Error {
SsmPutParameter {
profile: Option<String>,
parameter_name: String,
source: aws_sdk_ssm::types::SdkError<PutParameterError>,
source:
aws_sdk_ssm::error::SdkError<aws_sdk_ssm::operation::put_parameter::PutParameterError>,
backtrace: Backtrace,
},
}
2 changes: 1 addition & 1 deletion tough-ssm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl KeySource for SsmKeySource {
.description(key_id_hex.to_owned())
.set_key_id(self.key_id.as_ref().cloned())
.overwrite(true)
.set_type(Some(aws_sdk_ssm::model::ParameterType::SecureString))
.set_type(Some(aws_sdk_ssm::types::ParameterType::SecureString))
.value(value.to_owned())
.send();

Expand Down
2 changes: 1 addition & 1 deletion tough/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ url = "2"
walkdir = "2"

[dev-dependencies]
hex-literal = "0.3"
hex-literal = "0.4"
httptest = "0.15"
maplit = "1"

Expand Down
6 changes: 3 additions & 3 deletions tuftool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ aws-sdk-rust-native-tls = ["aws-config/native-tls", "aws-sdk-ssm/native-tls", "a
aws-sdk-rust-rustls = ["aws-config/rustls", "aws-sdk-ssm/rustls", "aws-sdk-kms/rustls",]

[dependencies]
aws-config = "0.54"
aws-sdk-kms = "0.24"
aws-sdk-ssm = "0.24"
aws-config = "0.55"
aws-sdk-kms = "0.28"
aws-sdk-ssm = "0.28"
chrono = { version = "0.4", default-features = false, features = ["alloc", "std", "clock"] }
clap = { version = "3", features = ["derive"] }
hex = "0.4"
Expand Down

0 comments on commit 2b9575f

Please sign in to comment.