pub struct AcmeProvider { /* private fields */ }Expand description
Pure-Rust ACME provider backed by instant-acme.
Implementations§
Source§impl AcmeProvider
impl AcmeProvider
pub fn new( email: String, cache_dir: PathBuf, challenges: Arc<RwLock<HashMap<String, String>>>, ) -> Self
Sourcepub async fn provision_cert(&self, domain: &str) -> Result<(Vec<u8>, Vec<u8>)>
pub async fn provision_cert(&self, domain: &str) -> Result<(Vec<u8>, Vec<u8>)>
Provision a TLS certificate for the given domain via ACME HTTP-01.
The proxy must be serving HTTP on port 80 so Let’s Encrypt can reach
/.well-known/acme-challenge/{token}.
Returns (cert_pem, key_pem) as byte vectors.
Sourcepub async fn ensure_cert(&self, domain: &str) -> Result<TlsAcceptor>
pub async fn ensure_cert(&self, domain: &str) -> Result<TlsAcceptor>
Ensure a valid cert exists for the domain — load from cache or provision.
Returns a TlsAcceptor ready for use, or an error if provisioning fails.
Trait Implementations§
Source§impl Clone for AcmeProvider
impl Clone for AcmeProvider
Source§fn clone(&self) -> AcmeProvider
fn clone(&self) -> AcmeProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AcmeProvider
impl !RefUnwindSafe for AcmeProvider
impl Send for AcmeProvider
impl Sync for AcmeProvider
impl Unpin for AcmeProvider
impl UnsafeUnpin for AcmeProvider
impl !UnwindSafe for AcmeProvider
Blanket Implementations§
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