[PR #408] Fix CertMagic cache initialization #411

Open
opened 2026-03-13 16:22:18 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/acme-dns/acme-dns/pull/408
Author: @d--j
Created: 2/23/2026
Status: 🔄 Open

Base: masterHead: patch-1


📝 Commits (1)

  • 5639d78 Fix nil cache error by returning the initialized Certmagic config, not the uninitialized config.

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 pkg/api/api.go (+3 -2)

📄 Description

The current master returns the uninitialized CertMagic configuration in the GetConfigForCert callback function. It should return the return value of certmagic.New – only this config has the cache set.

Fixes errors like these:

error        unable to get configuration to manage certificate; unable to renew        {"identifiers": ["configured.example.com"], "error": "config returned for certificate [configured.example.com] has nil cache; expected 0xc0000bb080 (this one)"}

Fixes #337 for refactored code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/acme-dns/acme-dns/pull/408 **Author:** [@d--j](https://github.com/d--j) **Created:** 2/23/2026 **Status:** 🔄 Open **Base:** `master` ← **Head:** `patch-1` --- ### 📝 Commits (1) - [`5639d78`](https://github.com/acme-dns/acme-dns/commit/5639d782d036109b4e095fb601d347aba406a037) Fix nil cache error by returning the initialized Certmagic config, not the uninitialized config. ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `pkg/api/api.go` (+3 -2) </details> ### 📄 Description The current `master` returns the uninitialized CertMagic configuration in the `GetConfigForCert` callback function. It should return the return value of `certmagic.New` – only this config has the cache set. Fixes errors like these: ``` error unable to get configuration to manage certificate; unable to renew {"identifiers": ["configured.example.com"], "error": "config returned for certificate [configured.example.com] has nil cache; expected 0xc0000bb080 (this one)"} ``` Fixes #337 for refactored code --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/acme-dns#411
No description provided.