Browse Source

Remove obsolete enum

main
Rodolphe Bréard 2 months ago
parent
commit
3fb8c23d85
Failed to extract signature
  1. 27
      acmed/src/account.rs

27
acmed/src/account.rs

@ -5,8 +5,6 @@ use crate::storage::FileManager;
use acme_common::crypto::{gen_keypair, HashFunction, JwsSignatureAlgorithm, KeyPair, KeyType};
use acme_common::error::Error;
use std::collections::HashMap;
use std::fmt;
use std::str::FromStr;
use std::time::SystemTime;
mod contact;
@ -19,31 +17,6 @@ pub struct ExternalAccount {
pub signature_algorithm: JwsSignatureAlgorithm,
}
#[derive(Clone, Debug)]
pub enum AccountContactType {
Mailfrom,
}
impl FromStr for AccountContactType {
type Err = Error;
fn from_str(s: &str) -> Result<Self, Error> {
match s.to_lowercase().as_str() {
"mailfrom" => Ok(AccountContactType::Mailfrom),
_ => Err(format!("{s}: unknown contact type.").into()),
}
}
}
impl fmt::Display for AccountContactType {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let s = match self {
AccountContactType::Mailfrom => "mailfrom",
};
write!(f, "{s}")
}
}
#[derive(Clone, Debug)]
pub struct AccountKey {
pub creation_date: SystemTime,

Loading…
Cancel
Save