diff --git a/README.md b/README.md index 0788a32..884b708 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ specification. ## Limitations -* Only tested with DNS challenges against Let's Encrypt so far (staging and production) +* Only tested with DNS challenges against Let's Encrypt (staging and production) and ZeroSSL (production) so far * Only supports ECDSA keys for now ## Getting started diff --git a/src/lib.rs b/src/lib.rs index a5bf8d6..4910066 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -24,7 +24,7 @@ use serde::Serialize; mod types; pub use types::{ AccountCredentials, Authorization, AuthorizationStatus, Challenge, ChallengeType, Error, - Identifier, LetsEncrypt, NewAccount, NewOrder, OrderState, OrderStatus, Problem, + Identifier, LetsEncrypt, NewAccount, NewOrder, OrderState, OrderStatus, Problem, ZeroSsl, }; use types::{ DirectoryUrls, Empty, FinalizeRequest, Header, JoseJson, Jwk, KeyOrKeyId, NewAccountPayload, diff --git a/src/types.rs b/src/types.rs index e19f94b..3d09b20 100644 --- a/src/types.rs +++ b/src/types.rs @@ -428,6 +428,22 @@ impl LetsEncrypt { } } +/// ZeroSSL ACME only supports production at the moment +#[allow(missing_docs)] +#[derive(Clone, Copy, Debug)] +pub enum ZeroSsl { + Production, +} + +impl ZeroSsl { + /// Get the directory URL for the given ZeroSSL server + pub const fn url(&self) -> &'static str { + match self { + Self::Production => "https://acme.zerossl.com/v2/DV90", + } + } +} + #[derive(Clone, Copy, Debug, Serialize)] #[serde(rename_all = "UPPERCASE")] pub(crate) enum SigningAlgorithm {