From 5dcfbc5fad6a7745e35253f9f5a7745adcf41e6e Mon Sep 17 00:00:00 2001 From: William Lallemand Date: Tue, 24 Mar 2026 21:51:23 +0100 Subject: [PATCH] MINOR: acme: store the TXT record in auth->token In case of dns-01 challenge, replace the token by the TXT record which is more pertinent and could be used later to verify if the record is correct. --- src/acme.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/acme.c b/src/acme.c index fe915d6ae..3d762af48 100644 --- a/src/acme.c +++ b/src/acme.c @@ -1730,8 +1730,12 @@ int acme_res_auth(struct task *task, struct acme_ctx *ctx, struct acme_auth *aut goto error; } + /* replace the token by the TXT entry */ + istfree(&auth->token); + auth->token = istdup(ist2(dns_record->area, dns_record->data)); + send_log(NULL, LOG_NOTICE,"acme: %s: dns-01 requires to set the \"_acme-challenge.%.*s\" TXT record to \"%.*s\" and use the \"acme challenge_ready %s domain %.*s\" command over the CLI\n", - ctx->store->path, (int)auth->dns.len, auth->dns.ptr, (int)dns_record->data, dns_record->area, ctx->store->path, (int)auth->dns.len, auth->dns.ptr); + ctx->store->path, (int)auth->dns.len, auth->dns.ptr, (int)auth->token.len, auth->token.ptr, ctx->store->path, (int)auth->dns.len, auth->dns.ptr); /* dump to the "dpapi" sink */ line[nmsg++] = ist("acme deploy ");