Add ZeroSSL endpoints

This commit is contained in:
Deftware 2024-01-22 13:57:08 +01:00 committed by Dirkjan Ochtman
parent c4b2247fbb
commit 9c96fb26a4
3 changed files with 18 additions and 2 deletions

View File

@ -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

View File

@ -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,

View File

@ -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 {