QoL for CSR generation.

This commit is contained in:
2025-11-19 02:57:26 -08:00
parent 8e997bda34
commit 7bb6973341
4 changed files with 39 additions and 12 deletions

View File

@@ -131,3 +131,7 @@ func LoadCSR(path string) (*x509.CertificateRequest, error) {
req, _, err := ParseCSR(in)
return req, err
}
func ExportCSRAsPEM(req *x509.CertificateRequest) []byte {
return pem.EncodeToMemory(&pem.Block{Type: pemTypeCertificateRequest, Bytes: req.Raw})
}