diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..7612009 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +.github export-ignore +.gitignore export-ignore \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index d78d471..8dde254 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,17 +21,17 @@ exclude = [ [dependencies] hex = "0.4.3" sha3 = "0.10.8" -secp256k1 = { version = "0.29.0", features = ["recovery"] } -rlp = "0.5.2" -asn1 = "0.17.0" -serde = { version = "1.0.206", features = ["derive"] } +secp256k1 = { version = "0.30.0", features = ["recovery"] } +rlp = "0.6.1" +asn1 = "0.18.0" +serde = { version = "1.0.213", features = ["derive"] } ethnum = "1.5.0" tokio = { version = "1", features = ["full"] } -aws-config = { version = "1.1.7", features = ["behavior-version-latest"] } -aws-sdk-kms = "1.37.0" +aws-config = { version = "1.5.9", features = ["behavior-version-latest"] } +aws-sdk-kms = "1.48.0" [dev-dependencies] -serde_json = "1.0.120" +serde_json = "1.0.132" serde_plain = "1.0.2" tokio-test = "0.4.4" lazy_static = "1.5.0" \ No newline at end of file diff --git a/README.md b/README.md index 5420877..e75e496 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,7 @@ designed with containers and container orchestration in mind. There are good chances that you will want to inject some secrets into the client application in the container orchestration solution (e.g. using [AWS Secrets Manager](https://aws.amazon.com/secrets-manager/) or -[HashiCorp Vault](https://www.hashicorp.com/products/vault)). The `KMS_KEY_ID` is a good example. +[HashiCorp Vault](https://www.hashicorp.com/products/vault)). ### Key access policy @@ -95,6 +95,10 @@ in the UUID format: export KMS_KEY_ID="[REDACTED]" ``` +**Note:** The library doesn't understand the `KMS_KEY_ID` variable itself, it is just a suggested +way to pass the key ID to the library logic (see examples in the +[documentation](https://docs.rs/evm-signer-kms)) for more details. + ### Testing configuration The easiest way to check whether everything works the way it should is by running tests. diff --git a/src/evm_account.rs b/src/evm_account.rs index 442e862..5259ddc 100644 --- a/src/evm_account.rs +++ b/src/evm_account.rs @@ -142,7 +142,7 @@ impl<'a> EvmAccount<'a> { // Possible v values are 0 or 1 for v in 0..2 { let signature = - RecoverableSignature::from_compact(&compact_signature, RecoveryId::from_i32(v)?)?; + RecoverableSignature::from_compact(&compact_signature, RecoveryId::try_from(v)?)?; // Uncompressed public key is 65 bytes long, beginning with 0x04 to indicate it is uncompressed let pub_key_uncompressed_bytes = secp_context diff --git a/src/lib.rs b/src/lib.rs index 9d9e41c..8cba397 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -42,6 +42,7 @@ //! } //! "#; //! +//! // Communication with AWS endpoint is asynchronous, so we need to use async main function //! #[tokio::main] //! async fn main() -> Result<()> { //! // Get KMS key ID from environment variable