Rename DefaultApplicationName to ApplicationName

Updated the `Pkcs11Options` class to rename the `DefaultApplicationName` property to `ApplicationName`, clarifying its role as a globally controlled value embedded in PDF signature metadata.

Modified `PdfDigitalSignatureService` to source `ApplicationName` directly from `Pkcs11Options`, removing client-level overrides. Updated `PdfSignatureController` to reflect this change by removing the `ApplicationName` property from `SignOptions`.

Updated `appsettings.json` and `README.md` to reflect the property name change. These changes enforce stricter configuration control, improving metadata consistency and security.
This commit is contained in:
2026-10-14 14:34:59 +02:00
parent 7a36316b7e
commit 4f8fa9afd8
5 changed files with 6 additions and 8 deletions

View File

@@ -112,7 +112,7 @@ Configuration section: `Crypt:Pkcs11`
"UserPin": "***",
"PrivateKeyLabel": "sign-key",
"CertificateLabel": "sign-cert",
"DefaultApplicationName": "signFLOW",
"ApplicationName": "signFLOW",
"UseUtcSigningTime": true
}
}

View File

@@ -44,7 +44,7 @@ public sealed class PdfDigitalSignatureService(IOptions<Pkcs11Options> options)
Location = request.Location,
ContactInfo = request.ContactInfo,
SigningTime = request.SigningTime ?? (pkcs11Options.UseUtcSigningTime ? DateTimeOffset.UtcNow : DateTimeOffset.Now),
ApplicationName = request.ApplicationName ?? pkcs11Options.DefaultApplicationName,
ApplicationName = pkcs11Options.ApplicationName,
CertificationLevel = ToDevExpressCertificationLevel(request.CertificationLevel)
?? ToDevExpressCertificationLevel(pkcs11Options.DefaultCertificationLevel)
?? PdfCertificationLevel.NoCertification