Rodolphe Bréard
2 months ago
Failed to extract signature
1 changed files with
0 additions and
27 deletions
-
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,
|
|
|
|