Skip to content

Commit

Permalink
verify response
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldjeffrey committed Oct 29, 2024
1 parent 2603467 commit e90b2a0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions mobile_config_cli/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,14 @@ impl CarrierClient {
signature: vec![],
};
request.signature = request.sign(keypair)?;
let res = self.client.list_incentive_promotions(request).await?;
Ok(res.into_inner())
match self.client.list_incentive_promotions(request).await {
Ok(response) => {
let res = response.into_inner();
res.verify(&self.server_pubkey)?;
Ok(res)
}
Err(error) => Err(error)?,
}
}
}

Expand Down Expand Up @@ -316,3 +322,4 @@ impl_verify!(AuthorizationListResV1, signature);
impl_verify!(EntityVerifyResV1, signature);
impl_verify!(GatewayInfoResV1, signature);
impl_verify!(GatewayInfoStreamResV1, signature);
impl_verify!(CarrierIncentivePromotionListResV1, signature);

0 comments on commit e90b2a0

Please sign in to comment.