Fix renew require new challenge

Signed-off-by: Bryan Frimin <bryan@getprobo.com>
This commit is contained in:
Bryan Frimin
2025-09-30 15:24:25 +02:00
parent 5ae8699535
commit acb6348d40
2 changed files with 108 additions and 17 deletions

View File

@@ -33,6 +33,15 @@ func EncodeCertificate(der []byte) []byte {
return pem.EncodeToMemory(block)
}
// EncodeCertificateChain encodes multiple DER-encoded certificates into a single PEM chain
func EncodeCertificateChain(derCerts [][]byte) []byte {
var chain []byte
for _, der := range derCerts {
chain = append(chain, EncodeCertificate(der)...)
}
return chain
}
func EncodePrivateKey(key crypto.Signer) ([]byte, error) {
var keyDER []byte
var keyType string