[team] Team vaults: rustfmt on the files this change touches
This commit is contained in:
@@ -100,9 +100,8 @@ fn lower_hex(s: &str, len: usize) -> bool {
|
||||
}
|
||||
|
||||
pub(crate) fn pub_key(s: &str) -> Result<[u8; 32], TeamError> {
|
||||
let k: [u8; 32] = unb64(s)
|
||||
.and_then(|v| v.try_into().ok())
|
||||
.ok_or(TeamError::Invalid("pub is not base64 of 32 bytes"))?;
|
||||
let k: [u8; 32] =
|
||||
unb64(s).and_then(|v| v.try_into().ok()).ok_or(TeamError::Invalid("pub is not base64 of 32 bytes"))?;
|
||||
if k == [0; 32] {
|
||||
return Err(TeamError::Invalid("pub is all zeros"));
|
||||
}
|
||||
@@ -176,7 +175,9 @@ impl SignRequest {
|
||||
return bad("artifact_digest has the wrong length for its format");
|
||||
}
|
||||
match self.format {
|
||||
Format::Cosign => custos_sign::image_ok(&self.image).map_err(|_| TeamError::Invalid("image is not a repository"))?,
|
||||
Format::Cosign => {
|
||||
custos_sign::image_ok(&self.image).map_err(|_| TeamError::Invalid("image is not a repository"))?
|
||||
}
|
||||
_ if !self.image.is_empty() => return bad("image is for cosign only"),
|
||||
_ => {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user