Fix algorithm mapping.

RS256/384/512 algorithm strings were mapped to HMAC-SHA256/384/512
enumerators.
This commit is contained in:
Max Burke 2019-05-10 16:36:28 -07:00
parent 89fbd8f0ce
commit f68210c688
No known key found for this signature in database
GPG Key ID: B228655975FF09EF
1 changed files with 3 additions and 3 deletions

View File

@ -47,9 +47,9 @@ impl FromStr for Algorithm {
"HS512" => Ok(Algorithm::HS512),
"ES256" => Ok(Algorithm::ES256),
"ES384" => Ok(Algorithm::ES384),
"RS256" => Ok(Algorithm::HS256),
"RS384" => Ok(Algorithm::HS384),
"RS512" => Ok(Algorithm::HS512),
"RS256" => Ok(Algorithm::RS256),
"RS384" => Ok(Algorithm::RS384),
"RS512" => Ok(Algorithm::RS512),
_ => Err(new_error(ErrorKind::InvalidAlgorithmName)),
}
}