Files
mmd-pdf/Services/Signing/PfxFileCertificateProvider.cs
T
kua-agent 6610acfa44 feat: rebrand to MMD PDF, single corporate theme, and remove original text under an edit
- Services/PdfRedactText.cs: strip text whose origin falls inside a CoverAnnotation
  from the page content stream at save time, hooked into PdfBurn.DrawAnnotationsIntoDoc.
  Fixes edited values staying recoverable by text extraction.
- Themes/MMD.xaml replaces all thirteen themes; picker and accent strip removed; no dark mode.
- Rename KillerPDF -> MMD PDF across code, resources, packaging and locale strings; new icon.
- Remove the upstream author credit and the in-app install button.
2026-08-27 07:37:09 +02:00

21 lines
861 B
C#

using System.IO;
using System.Security.Cryptography.X509Certificates;
namespace MmdPdf.Services.Signing
{
/// <summary>
/// Loads a signing certificate from a .pfx / .p12 file plus its password. Fully cross-platform,
/// so this is the default certificate source on every OS.
/// </summary>
internal sealed class PfxFileCertificateProvider(string path, string password) : ICertificateProvider
{
public string DisplayName => Path.GetFileName(path);
public X509Certificate2 GetCertificate()
// Exportable so a Bouncy Castle signer can later pull the private key to build the CMS.
// (EphemeralKeySet is intentionally not used - it does not exist on .NET Framework.)
=> new(path, password,
X509KeyStorageFlags.Exportable | X509KeyStorageFlags.PersistKeySet);
}
}