Skip to main content

Issuer

Trait Issuer 

Source
pub trait Issuer:
    Send
    + Sync
    + Debug {
    // Required methods
    fn issue<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        ct: &'life1 CancellationToken,
        csr: &'life2 Csr,
        attempt: u32,
    ) -> Pin<Box<dyn Future<Output = Result<IssuedCertificate>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait;
    fn issuer_key(&self) -> String;
    fn as_any(&self) -> &dyn Any;

    // Provided methods
    fn issue_with_replaces<'life0, 'life1, 'life2, 'life3, 'async_trait>(
        &'life0 self,
        ct: &'life1 CancellationToken,
        csr: &'life2 Csr,
        attempt: u32,
        _replaces: Option<&'life3 str>,
    ) -> Pin<Box<dyn Future<Output = Result<IssuedCertificate>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             'life3: 'async_trait { ... }
    fn pre_check<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _ct: &'life1 CancellationToken,
        _names: &'life2 [String],
        _interactive: bool,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn revoke<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _ct: &'life1 CancellationToken,
        _resource: &'life2 CertificateResource,
        _reason: RevocationReason,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    fn get_renewal_info<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        _ct: &'life1 CancellationToken,
        _cert: &'life2 Certificate,
    ) -> Pin<Box<dyn Future<Output = Result<RenewalInfo>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}
Expand description

A source of certificates.

Required Methods§

Source

fn issue<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ct: &'life1 CancellationToken, csr: &'life2 Csr, attempt: u32, ) -> Pin<Box<dyn Future<Output = Result<IssuedCertificate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Obtain a certificate for the CSR.

attempt is the retry counter (0 = first attempt). Issuers may use it to switch to a test CA on retries.

Source

fn issuer_key(&self) -> String

Unique key identifying this issuer (storage prefix).

Source

fn as_any(&self) -> &dyn Any

Access this issuer as dyn Any so callers can recover the concrete type from an erased Arc<dyn Issuer> (trait objects need the explicit downcast hook).

Provided Methods§

Source

fn issue_with_replaces<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ct: &'life1 CancellationToken, csr: &'life2 Csr, attempt: u32, _replaces: Option<&'life3 str>, ) -> Pin<Box<dyn Future<Output = Result<IssuedCertificate>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Obtain a certificate while optionally telling an ACME-capable issuer which certificate is being replaced for ARI-aware renewal. Custom issuers keep the original behavior by default.

Source

fn pre_check<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ct: &'life1 CancellationToken, _names: &'life2 [String], _interactive: bool, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Optional pre-checks before issuance.

Source

fn revoke<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ct: &'life1 CancellationToken, _resource: &'life2 CertificateResource, _reason: RevocationReason, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Optional revocation.

Source

fn get_renewal_info<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, _ct: &'life1 CancellationToken, _cert: &'life2 Certificate, ) -> Pin<Box<dyn Future<Output = Result<RenewalInfo>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Optional ARI support.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl Issuer for AcmeIssuer

Source§

impl Issuer for ZeroSslApiIssuer

Source§

impl Issuer for ZeroSslIssuer

ZeroSSL is an issuer in its own right, not merely a builder for an AcmeIssuer. Delegate the protocol work while preserving a distinct type for callers that want to select it explicitly.