From 8e3323dd94139620292d1d25d9512ef270ec6195 Mon Sep 17 00:00:00 2001 From: cs8425 Date: Wed, 29 Apr 2026 19:34:25 +0800 Subject: [PATCH] fix pem format not export when first create CA cert --- Proxy/ProxyCertificateAuthority.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Proxy/ProxyCertificateAuthority.cs b/Proxy/ProxyCertificateAuthority.cs index cf8df7a..2e4f68a 100644 --- a/Proxy/ProxyCertificateAuthority.cs +++ b/Proxy/ProxyCertificateAuthority.cs @@ -85,6 +85,9 @@ public sealed class ProxyCertificateAuthority File.WriteAllBytes(pfxPath, exportable.Export(X509ContentType.Pfx, Password)); File.WriteAllBytes(RootCerPath, exportable.Export(X509ContentType.Cert)); _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; }