DNS, DKIM and ACME improvements - tests passing

This commit is contained in:
Maurus Decimus
2026-04-03 16:39:22 +02:00
parent 4a4dcfd7e3
commit c44d3da6dc
13 changed files with 1004 additions and 19 deletions

View File

@@ -253,6 +253,7 @@ impl AcmeRequestBuilder {
&format!("_acme-challenge.{}", domain),
DnsRecord::TXT(self.dns_proof(challenge)?),
true,
true,
)
.await
.map_err(AcmeError::Dns)?;

View File

@@ -261,9 +261,12 @@ impl DnsUpdater {
name: &str,
record: DnsRecord,
verify: bool,
delete_before_create: bool,
) -> Result<bool, String> {
// First try deleting the record
if let Err(err) = self.updater.delete(name, origin, record.as_type()).await {
if delete_before_create
&& let Err(err) = self.updater.delete(name, origin, record.as_type()).await
{
// Errors are expected if the record does not exist
trc::event!(
Dns(DnsEvent::RecordDeletionFailed),