feat(caddy): CLI command to list certificates stored in the Uncloud cluster storage for Caddy

This commit is contained in:
Pasha Sviderski committed 2026-10-01 14:19:53 +10:00
1 parent 70de7b1b8f
commit 9c21ae6b08
6 files changed
+327

No files matched your search

+6
View File
@@ -1,6 +1,7 @@
package api
import (
"crypto/sha256"
"crypto/x509"
"encoding/json"
"encoding/pem"
@@ -23,6 +24,11 @@ type IssuedCertificate struct {
IssuerData CertificateIssuerData
}
// Fingerprint returns the SHA-256 fingerprint of the leaf certificate.
func (c IssuedCertificate) Fingerprint() [sha256.Size]byte {
return sha256.Sum256(c.Chain[0].Raw)
}
// CertificateIssuerData preserves issuer-specific metadata and provides a best-effort typed view of ACME records.
type CertificateIssuerData struct {
// Raw is the original issuer_data JSON, including unrecognized formats and fields.