|
@ -71,7 +71,7 @@ impl FromStr for KeyType { |
|
|
type Err = Error;
|
|
|
type Err = Error;
|
|
|
|
|
|
|
|
|
fn from_str(s: &str) -> Result<Self, Error> {
|
|
|
fn from_str(s: &str) -> Result<Self, Error> {
|
|
|
match s.to_lowercase().replace("-", "_").as_str() {
|
|
|
|
|
|
|
|
|
match s.to_lowercase().replace('-', "_").as_str() {
|
|
|
"rsa2048" => Ok(KeyType::Rsa2048),
|
|
|
"rsa2048" => Ok(KeyType::Rsa2048),
|
|
|
"rsa4096" => Ok(KeyType::Rsa4096),
|
|
|
"rsa4096" => Ok(KeyType::Rsa4096),
|
|
|
"ecdsa_p256" => Ok(KeyType::EcdsaP256),
|
|
|
"ecdsa_p256" => Ok(KeyType::EcdsaP256),
|
|
|