@@ -15,7 +15,7 @@ use crate::types::{
1515 Authorization , AuthorizationState , AuthorizationStatus , AuthorizedIdentifier , Challenge ,
1616 ChallengeType , DeviceAttestation , Empty , FinalizeRequest , OrderState , OrderStatus , Problem ,
1717} ;
18- use crate :: { Error , Key , crypto, nonce_from_response, retry_after} ;
18+ use crate :: { ChallengeStatus , Error , Key , crypto, nonce_from_response, retry_after} ;
1919
2020/// An ACME order as described in RFC 8555 (section 7.1.3)
2121///
@@ -462,10 +462,13 @@ impl ChallengeHandle<'_> {
462462 /// `payload` is the device attestation object as defined in link. Provide the attestation
463463 /// object as a raw blob. Base64 encoding of the attestation object `payload.att_obj`
464464 /// is done by this function.
465+ ///
466+ /// The function yields the challenge status from the ACME server that validated the
467+ /// attestation challenge.
465468 pub async fn send_device_attestation (
466469 & mut self ,
467470 payload : & DeviceAttestation < ' _ > ,
468- ) -> Result < ( ) , Error > {
471+ ) -> Result < ChallengeStatus , Error > {
469472 if self . challenge . r#type != ChallengeType :: DeviceAttest01 {
470473 return Err ( Error :: Str ( "challenge type should be device-attest-01" ) ) ;
471474 }
@@ -483,7 +486,7 @@ impl ChallengeHandle<'_> {
483486 let response = Problem :: check :: < Challenge > ( rsp) . await ?;
484487 match response. error {
485488 Some ( details) => Err ( Error :: Api ( details) ) ,
486- None => Ok ( ( ) ) ,
489+ None => Ok ( response . status ) ,
487490 }
488491 }
489492
0 commit comments