pub struct Http01Solver {
pub port: u16,
/* private fields */
}Expand description
Solves ACME HTTP-01 challenges by serving the key authorization string
at GET /.well-known/acme-challenge/{token} on a simple HTTP server.
The solver lazily starts a TCP listener on the configured port (default: 80) when the first challenge is presented, and stops it when all challenges have been cleaned up. Multiple concurrent challenges share the same server.
Important: Port 80 must be reachable from the internet for the ACME CA’s validation server to reach this solver.
Fields§
§port: u16The port to listen on (default: 80).
Implementations§
Source§impl Http01Solver
impl Http01Solver
Sourcepub fn new(port: u16) -> Http01Solver
pub fn new(port: u16) -> Http01Solver
Create a new HTTP-01 solver that will listen on the given port.
The server is not started until Solver::present is called for
the first time.
Trait Implementations§
Source§impl Debug for Http01Solver
impl Debug for Http01Solver
Source§impl Default for Http01Solver
impl Default for Http01Solver
Source§fn default() -> Http01Solver
fn default() -> Http01Solver
Returns the “default value” for a type. Read more
Source§impl Solver for Http01Solver
impl Solver for Http01Solver
Source§fn present<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Http01Solver: 'async_trait,
fn present<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
token: &'life2 str,
key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Http01Solver: 'async_trait,
Present the challenge — make it solvable by the ACME CA’s validation
server (e.g. start an HTTP server, create a DNS record, or install a
TLS certificate).
Source§fn cleanup<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
token: &'life2 str,
_key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Http01Solver: 'async_trait,
fn cleanup<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
token: &'life2 str,
_key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Http01Solver: 'async_trait,
Clean up after the challenge (e.g. stop the server, delete the DNS
record, remove the certificate from the cache).
Source§fn wait<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
_token: &'life2 str,
_key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn wait<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_domain: &'life1 str,
_token: &'life2 str,
_key_auth: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Optionally wait until the challenge is ready to be verified by the CA. Read more
Auto Trait Implementations§
impl !Freeze for Http01Solver
impl !RefUnwindSafe for Http01Solver
impl !UnwindSafe for Http01Solver
impl Send for Http01Solver
impl Sync for Http01Solver
impl Unpin for Http01Solver
impl UnsafeUnpin for Http01Solver
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more