pub struct AcmeIssuer { /* private fields */ }Expand description
Issues certificates for individual domains over ACME HTTP-01.
Implementations§
Source§impl AcmeIssuer
impl AcmeIssuer
Sourcepub fn new(
directory_url: impl Into<String>,
contact: Option<String>,
pool: PgPool,
cert_store: Arc<CertificateStore>,
) -> Self
pub fn new( directory_url: impl Into<String>, contact: Option<String>, pool: PgPool, cert_store: Arc<CertificateStore>, ) -> Self
Create an issuer against a directory URL.
Sourcepub fn with_root_certificate(self, pem_path: impl Into<PathBuf>) -> Self
pub fn with_root_certificate(self, pem_path: impl Into<PathBuf>) -> Self
Trust a private root for the ACME directory’s own TLS.
For testing against Pebble, which serves its directory with a self-signed chain. Never needed against a public CA.
Sourcepub fn directory_url(&self) -> &str
pub fn directory_url(&self) -> &str
The directory this issuer talks to.
Sourcepub async fn issue(&self, domain: &str) -> ProxyResult<Certificate>
pub async fn issue(&self, domain: &str) -> ProxyResult<Certificate>
Obtain a certificate for domain and store it.
Returns the stored certificate. Any challenge rows this created are removed before returning, on the failure path too – a token left answerable after its order is gone is a response the proxy will hand out to anyone who asks for it.
Auto Trait Implementations§
impl !RefUnwindSafe for AcmeIssuer
impl !UnwindSafe for AcmeIssuer
impl Freeze for AcmeIssuer
impl Send for AcmeIssuer
impl Sync for AcmeIssuer
impl Unpin for AcmeIssuer
impl UnsafeUnpin for AcmeIssuer
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
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