(
self,
request: ListCertAttestationsRequest,
)
| 555 | } |
| 556 | |
| 557 | async fn list_cert_attestations( |
| 558 | self, |
| 559 | request: ListCertAttestationsRequest, |
| 560 | ) -> Result<ListCertAttestationsResponse> { |
| 561 | let kv_store = self.state.kv_store(); |
| 562 | |
| 563 | let latest = kv_store |
| 564 | .get_cert_attestation_latest(&request.domain) |
| 565 | .map(|att| CertAttestationInfo { |
| 566 | public_key: att.public_key, |
| 567 | quote: att.quote, |
| 568 | generated_by: att.generated_by, |
| 569 | generated_at: att.generated_at, |
| 570 | }); |
| 571 | |
| 572 | let mut history: Vec<CertAttestationInfo> = kv_store |
| 573 | .list_cert_attestations(&request.domain) |
| 574 | .into_iter() |
| 575 | .map(|att| CertAttestationInfo { |
| 576 | public_key: att.public_key, |
| 577 | quote: att.quote, |
| 578 | generated_by: att.generated_by, |
| 579 | generated_at: att.generated_at, |
| 580 | }) |
| 581 | .collect(); |
| 582 | |
| 583 | // Apply limit if specified |
| 584 | if request.limit > 0 { |
| 585 | history.truncate(request.limit as usize); |
| 586 | } |
| 587 | |
| 588 | Ok(ListCertAttestationsResponse { latest, history }) |
| 589 | } |
| 590 | |
| 591 | // ==================== Global Certbot Configuration ==================== |
| 592 |
nothing calls this directly
no test coverage detected