mirror of
https://github.com/psviderski/uncloud.git
synced 2026-10-06 13:18:58 +00:00
feat(caddy): CLI command to list certificates stored in the Uncloud cluster storage for Caddy
This commit is contained in:
1 parent
70de7b1b8f
commit
9c21ae6b08
6 files changed
+327
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user