Save attestation for a domain (saves both latest and history)
(&self, domain: &str, attestation: &CertAttestation)
| 988 | |
| 989 | /// Save attestation for a domain (saves both latest and history) |
| 990 | pub fn save_cert_attestation(&self, domain: &str, attestation: &CertAttestation) -> Result<()> { |
| 991 | let mut state = self.persistent.write(); |
| 992 | // Save to history |
| 993 | state.put_encoded( |
| 994 | keys::cert_attestation_history(domain, attestation.generated_at), |
| 995 | attestation, |
| 996 | )?; |
| 997 | // Update latest |
| 998 | state.put_encoded(keys::cert_attestation_latest(domain), attestation)?; |
| 999 | Ok(()) |
| 1000 | } |
| 1001 | |
| 1002 | /// List all attestation history for a domain (sorted by timestamp descending) |
| 1003 | pub fn list_cert_attestations(&self, domain: &str) -> Vec<CertAttestation> { |
no test coverage detected