pub struct ChallengeHandle<'a> { /* private fields */ }
Expand description
Wrapper type for interacting with a Challenge
’s state
For each challenge, you’ll need to:
- Obtain the
ChallengeHandle::key_authorization()
for the challenge response - Set up the challenge response in your infrastructure (details vary by challenge type)
- Call
ChallengeHandle::set_ready()
for that challenge after setup is complete
After the challenges have been set to ready, call Order::poll_ready()
to wait until the
order is ready to be finalized (or to learn if it becomes invalid). Once it is ready, call
Order::finalize()
to get the certificate.
Dereferences to the underlying Challenge
for easy access to the challenge’s state.
Implementations§
Source§impl ChallengeHandle<'_>
impl ChallengeHandle<'_>
Sourcepub async fn set_ready(&mut self) -> Result<(), Error>
pub async fn set_ready(&mut self) -> Result<(), Error>
Notify the server that the given challenge is ready to be completed
Sourcepub async fn send_device_attestation(
&mut self,
payload: &DeviceAttestation<'_>,
) -> Result<(), Error>
pub async fn send_device_attestation( &mut self, payload: &DeviceAttestation<'_>, ) -> Result<(), Error>
Notify the server that the challenge is ready by sending a device attestation
This function is for the ACME challenge device-attest-01. It should not be used with other challenge types. See https://datatracker.ietf.org/doc/draft-acme-device-attest/ for details.
payload
is the device attestation object as defined in link. Provide the attestation
object as a raw blob. Base64 encoding of the attestation object payload.att_obj
is done by this function.
Create a KeyAuthorization
for this challenge
Combines a challenge’s token with the thumbprint of the account’s public key to compute
the challenge’s KeyAuthorization
. The KeyAuthorization
must be used to provision the
expected challenge response based on the challenge type in use.
Sourcepub fn identifier(&self) -> &AuthorizedIdentifier<'_>
pub fn identifier(&self) -> &AuthorizedIdentifier<'_>
The identifier for this challenge’s authorization