Skip to content

Commit

Permalink
rename hand_shake to handshake
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaczanowski committed Nov 11, 2024
1 parent 1b1b87a commit 8377d27
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/config/provider/hashicorp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(),
}
Expand Down
6 changes: 3 additions & 3 deletions src/keyring/providers/hashicorp/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}

Expand Down
4 changes: 2 additions & 2 deletions src/keyring/providers/hashicorp/vault_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8377d27

Please sign in to comment.