fix pem format not export when first create CA cert

This commit is contained in:
cs8425
2026-04-29 19:34:25 +08:00
parent 7e83d2ccd2
commit 8e3323dd94

View File

@@ -85,6 +85,9 @@ public sealed class ProxyCertificateAuthority
File.WriteAllBytes(pfxPath, exportable.Export(X509ContentType.Pfx, Password)); File.WriteAllBytes(pfxPath, exportable.Export(X509ContentType.Pfx, Password));
File.WriteAllBytes(RootCerPath, exportable.Export(X509ContentType.Cert)); File.WriteAllBytes(RootCerPath, exportable.Export(X509ContentType.Cert));
_logger.LogInformation("Created MikuSB proxy root certificate at {CertificatePath}", RootCerPath); _logger.LogInformation("Created MikuSB proxy root certificate at {CertificatePath}", RootCerPath);
File.WriteAllText(RootCerPemPath, exportable.ExportCertificatePem());
_logger.LogInformation("Created MikuSB proxy root certificate (PEM) at {CertificatePath}", RootCerPemPath);
return exportable; return exportable;
} }