Perform DNS-01 authorizations sequentially to avoid race conditions in some DNS providers

This commit is contained in:
Maurus Decimus
2026-05-19 19:25:17 +02:00
parent 08b02c9e91
commit 897d3c282c
2 changed files with 16 additions and 65 deletions

View File

@@ -104,11 +104,18 @@ impl AcmeRequestBuilder {
loop {
match order.status {
OrderStatus::Pending => {
let auth_futures = order
.authorizations
.iter()
.map(|url| self.authorize(server, url, dns_parameters.as_ref()));
try_join_all(auth_futures).await?;
if matches!(self.challenge, ChallengeType::Dns01) {
for url in &order.authorizations {
self.authorize(server, url, dns_parameters.as_ref())
.await?;
}
} else {
let auth_futures = order
.authorizations
.iter()
.map(|url| self.authorize(server, url, dns_parameters.as_ref()));
try_join_all(auth_futures).await?;
}
trc::event!(
Acme(AcmeEvent::AuthCompleted),
Url = self.directory.new_order.to_string(),