Skip to content

Commit

Permalink
cargo clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kvinwang committed Jan 12, 2025
1 parent 96b73ca commit 46582d5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kms/src/onboard_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ impl Keys {

pub(crate) fn bootstrap_keys(cfg: &KmsConfig) -> Result<()> {
let keys = Keys::generate("kms.localhost").context("Failed to generate keys")?;
keys.store(&cfg)?;
keys.store(cfg)?;
Ok(())
}

Expand Down
2 changes: 1 addition & 1 deletion ra-rpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ impl RaClient {
};

let verified_attestation = attestation
.verify_with_ra_pubkey(&cert.public_key().raw, self.pccs_url.as_deref())
.verify_with_ra_pubkey(cert.public_key().raw, self.pccs_url.as_deref())
.await
.context("Failed to verify the attestation report")?;

Expand Down
6 changes: 3 additions & 3 deletions ra-tls/src/cert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ pub struct CertRequest<'a, Key> {
usage_client_auth: bool,
}

impl<'a, Key> CertRequest<'a, Key> {
impl<Key> CertRequest<'_, Key> {
fn into_cert_params(self) -> Result<CertificateParams> {
let mut params = CertificateParams::new(vec![])?;
let mut dn = DistinguishedName::new();
Expand Down Expand Up @@ -247,7 +247,7 @@ impl<'a, Key> CertRequest<'a, Key> {
}
}

impl<'a> CertRequest<'a, KeyPair> {
impl CertRequest<'_, KeyPair> {
/// Create a self-signed certificate.
pub fn self_signed(self) -> Result<Certificate> {
let key = self.key;
Expand All @@ -256,7 +256,7 @@ impl<'a> CertRequest<'a, KeyPair> {
}
}

impl<'a, Key: PublicKeyData> CertRequest<'a, Key> {
impl<Key: PublicKeyData> CertRequest<'_, Key> {
/// Create a certificate signed by a given issuer.
pub fn signed_by(self, issuer: &Certificate, issuer_key: &KeyPair) -> Result<Certificate> {
let key = self.key;
Expand Down
2 changes: 1 addition & 1 deletion tappd/src/rpc_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl TappdRpc for InternalRpcHandler {
} else {
&self.state.inner.keys.k256_key
};
let derived_key = derive_ecdsa_key_pair_from_bytes(&seed, &[request.path.as_bytes()])
let derived_key = derive_ecdsa_key_pair_from_bytes(seed, &[request.path.as_bytes()])
.context("Failed to derive key")?;
let config = CertConfig {
org_name: None,
Expand Down

0 comments on commit 46582d5

Please sign in to comment.