From 8377d27f0dee2e036a6c25a85fe3ff5d84b90c62 Mon Sep 17 00:00:00 2001 From: Mateusz Kaczanowski Date: Fri, 8 Nov 2024 15:49:27 +0100 Subject: [PATCH] rename hand_shake to handshake --- src/config/provider/hashicorp.rs | 4 ++-- src/keyring/providers/hashicorp/client.rs | 6 +++--- src/keyring/providers/hashicorp/vault_client.rs | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/config/provider/hashicorp.rs b/src/config/provider/hashicorp.rs index 25f6fa29..28d88ebc 100644 --- a/src/config/provider/hashicorp.rs +++ b/src/config/provider/hashicorp.rs @@ -53,7 +53,7 @@ pub struct VaultEndpointConfig { pub keys: String, /// HashiCorp Vault API endpoint path to perform a handshake - pub hand_shake: String, + pub handshake: String, /// HashiCorp Vault API endpoint path to recieve a wrapping key pub wrapping_key: String, @@ -66,7 +66,7 @@ impl Default for VaultEndpointConfig { fn default() -> Self { VaultEndpointConfig { keys: "/v1/transit/keys".into(), - hand_shake: "/v1/auth/token/lookup-self".into(), + handshake: "/v1/auth/token/lookup-self".into(), wrapping_key: "/v1/transit/wrapping_key".into(), sign: "/v1/transit/sign".into(), } diff --git a/src/keyring/providers/hashicorp/client.rs b/src/keyring/providers/hashicorp/client.rs index 235a1ca2..b2b82822 100644 --- a/src/keyring/providers/hashicorp/client.rs +++ b/src/keyring/providers/hashicorp/client.rs @@ -36,13 +36,13 @@ impl TendermintValidatorApp { }; debug!("Initialized with Vault host at {}", api_endpoint); - app.hand_shake()?; + app.handshake()?; Ok(app) } - fn hand_shake(&self) -> Result<(), Error> { - let _ = self.vault_client.hand_shake(); + fn handshake(&self) -> Result<(), Error> { + let _ = self.vault_client.handshake(); Ok(()) } diff --git a/src/keyring/providers/hashicorp/vault_client.rs b/src/keyring/providers/hashicorp/vault_client.rs index 6f8a3b6a..f78ddc19 100644 --- a/src/keyring/providers/hashicorp/vault_client.rs +++ b/src/keyring/providers/hashicorp/vault_client.rs @@ -312,12 +312,12 @@ impl VaultClient { Ok(array) } - pub fn hand_shake(&self) -> Result<(), Error> { + pub fn handshake(&self) -> Result<(), Error> { let _ = self .agent .get(&format!( "{}{}", - self.api_endpoint, self.endpoints.hand_shake, + self.api_endpoint, self.endpoints.handshake, )) .set(VAULT_TOKEN, &self.token) .call()