Struct instant_acme::Order

source ·
pub struct Order { /* private fields */ }
Expand description

An ACME order as described in RFC 8555 (section 7.1.3)

An order is created from an Account by calling Account::new_order(). The Order type represents the stable identity of an order, while the Order::state() method gives you access to the current state of the order according to the server.

https://datatracker.ietf.org/doc/html/rfc8555#section-7.1.3

Implementations

Retrieve the authorizations for this order

An order will contain one authorization to complete per identifier in the order. After creating an order, you’ll need to retrieve the authorizations so that you can set up a challenge response for each authorization.

For each authorization, you’ll need to:

After the challenges have been set up, check the Order::state() to see if the order is ready to be finalized (or becomes invalid). Once it is ready, call Order::finalize() to get the certificate.

Create a KeyAuthorization for the given Challenge

Signs the challenge’s token with the account’s private key and use the value from KeyAuthorization::as_str() as the challenge response.

Request a certificate from the given Certificate Signing Request (CSR)

Creating a CSR is outside of the scope of instant-acme. Make sure you pass in a DER representation of the CSR in csr_der and the OrderState::finalize URL in finalize_url. The resulting String will contain the PEM-encoded certificate chain.

Notify the server that the given challenge is ready to be completed

challenge_url should be the Challenge::url field.

Get the current state of the given challenge

Get the current state of the order

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more