Account

Struct Account 

Source
pub struct Account { /* private fields */ }
Expand description

Account with an ACME provider.

Accounts are created using Directory::account and consist of a contact email address and a private key for signing requests to the ACME API.

acme-lib uses elliptic curve P-256 for accessing the account. This does not affect which key algorithms that can be used for the issued certificates.

The advantage of using elliptic curve cryptography is that the signed requests against the ACME lib are kept small and that the public key can be derived from the private.

Implementations§

Source§

impl Account

Source

pub fn acme_private_key_pem(&self) -> Result<String>

Private key for this account.

The key is an elliptic curve private key.

Source

pub fn new_order( &self, primary_name: &str, alt_names: &[&str], ) -> Result<NewOrder>

Create a new order to issue a certificate for this account.

Each order has a required primary_name (which will be set as the certificates CN) and a variable number of alt_names.

This library doesn’t constrain the number of alt_names, but it is limited by the ACME API provider. Let’s Encrypt sets a max of 100 names per certificate.

Every call creates a new order with the ACME API provider, even when the domain names supplied are exactly the same.

Source

pub fn revoke_certificate( &self, cert: &Certificate, reason: RevocationReason, ) -> Result<()>

Revoke a certificate for the reason given.

Source

pub fn api_account(&self) -> &ApiAccount

Access the underlying JSON object for debugging.

Trait Implementations§

Source§

impl Clone for Account

Source§

fn clone(&self) -> Account

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.