signatures: Rename UnknownAlgorithm => UnsupportedAlgorithm

This commit is contained in:
Jonas Platte 2021-05-26 13:37:56 +02:00
parent 4c31b83543
commit 3f520bf907
No known key found for this signature in database
GPG Key ID: CC154DE0E30B7C67
2 changed files with 4 additions and 4 deletions

View File

@ -262,7 +262,7 @@ pub enum SplitError {
#[error("malformed signature ID: expected version to contain only characters in the character set `[a-zA-Z0-9_]`, found `{0}`")] #[error("malformed signature ID: expected version to contain only characters in the character set `[a-zA-Z0-9_]`, found `{0}`")]
InvalidVersion(String), InvalidVersion(String),
/// The signature uses an unknown algorithm. /// The signature uses an unsupported algorithm.
#[error("unknown algorithm: {0}")] #[error("unsupported algorithm: {0}")]
UnknownAlgorithm(String), UnsupportedAlgorithm(String),
} }

View File

@ -93,7 +93,7 @@ fn split_id(id: &str) -> Result<(Algorithm, String), SplitError> {
let algorithm = match algorithm_input { let algorithm = match algorithm_input {
"ed25519" => Algorithm::Ed25519, "ed25519" => Algorithm::Ed25519,
algorithm => return Err(SplitError::UnknownAlgorithm(algorithm.into())), algorithm => return Err(SplitError::UnsupportedAlgorithm(algorithm.into())),
}; };
Ok((algorithm, signature_id[1].to_owned())) Ok((algorithm, signature_id[1].to_owned()))