From: Manuel Federanko <m.federanko@proxmox.com>
To: pbs-devel@lists.proxmox.com, pdm-devel@lists.proxmox.com
Subject: [PATCH proxmox 2/7] acme: add retry-after header to renewal information.
Date: Thu, 25 Jun 2026 16:13:32 +0200 [thread overview]
Message-ID: <20260625141337.181684-3-m.federanko@proxmox.com> (raw)
In-Reply-To: <20260625141337.181684-1-m.federanko@proxmox.com>
This is not yet used but makes it easier to make the ARI workflow of
the client smarter later.
Signed-off-by: Manuel Federanko <m.federanko@proxmox.com>
---
proxmox-acme/src/async_client.rs | 19 ++++++++++++++++++-
proxmox-acme/src/renewal.rs | 3 +++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/proxmox-acme/src/async_client.rs b/proxmox-acme/src/async_client.rs
index 6670bc24..c133a54e 100644
--- a/proxmox-acme/src/async_client.rs
+++ b/proxmox-acme/src/async_client.rs
@@ -360,7 +360,10 @@ impl AcmeClient {
match Self::execute(&mut self.http_client, request, &mut self.nonce).await {
Ok(response) => {
let data: crate::renewal::RenewalInformationData = response.json()?;
- Ok(Some(crate::renewal::RenewalInformation { data }))
+ Ok(Some(crate::renewal::RenewalInformation {
+ data,
+ retry_after: response.retry_after,
+ }))
}
Err(err) => Err(err.into()),
}
@@ -384,6 +387,7 @@ impl AcmeClient {
struct AcmeResponse {
body: Bytes,
location: Option<String>,
+ retry_after: Option<String>,
got_nonce: bool,
}
@@ -470,9 +474,22 @@ impl AcmeClient {
})
.transpose()?;
+ let retry_after = parts
+ .headers
+ .get("Retry-After")
+ .map(|header| {
+ header.to_str().map(str::to_owned).map_err(|err| {
+ Error::Client(format!(
+ "received invalid retry-after header from ACME server: {err}"
+ ))
+ })
+ })
+ .transpose()?;
+
return Ok(AcmeResponse {
body,
location,
+ retry_after,
got_nonce,
});
}
diff --git a/proxmox-acme/src/renewal.rs b/proxmox-acme/src/renewal.rs
index eb4ff96a..6454affc 100644
--- a/proxmox-acme/src/renewal.rs
+++ b/proxmox-acme/src/renewal.rs
@@ -30,4 +30,7 @@ pub struct RenewalInformationData {
pub struct RenewalInformation {
/// the actual response of the acme server
pub data: RenewalInformationData,
+
+ /// when to check the renewal endpoint again
+ pub retry_after: Option<String>,
}
--
2.47.3
next prev parent reply other threads:[~2026-06-25 14:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 14:13 [PATCH proxmox{,-backup,-datacenter-manager} 0/7] acme: fix #6372 implement basic ARI support Manuel Federanko
2026-06-25 14:13 ` [PATCH proxmox 1/7] acme: client: add methods to fetch renewal information Manuel Federanko
2026-06-25 14:13 ` Manuel Federanko [this message]
2026-06-25 14:13 ` [PATCH proxmox 3/7] acme: allow specifying the certificate that is replaced by an order Manuel Federanko
2026-06-25 14:13 ` [PATCH proxmox 4/7] acme: cert: add dedicated ari_id field to the certificate info Manuel Federanko
2026-06-25 14:13 ` [PATCH proxmox-backup 5/7] acme: add ari_id to cert info Manuel Federanko
2026-06-25 14:13 ` [PATCH proxmox-backup 6/7] acme: fix #6372 implement ARI renewal information fetching Manuel Federanko
2026-06-25 14:13 ` [PATCH proxmox-datacenter-manager 7/7] acme: fix #6372 use ARI for renewal if available Manuel Federanko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260625141337.181684-3-m.federanko@proxmox.com \
--to=m.federanko@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pdm-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox