Replaced the `ContactInfo` property with separate `Email` and `Phone` fields in `PdfSignOptionsDto` and `PdfSignatureCheckItemDto` for better granularity. Updated the `PdfDigitalSignatureService` to handle the new fields, introducing `BuildContactInfo` and `ParseContactInfo` methods for constructing and parsing contact information. Modified the `PdfSignatureController` to reflect these changes, updating request models and the `SignPdfAsync` method. Updated the `README.md` to document the new structure. These changes improve the clarity and structure of contact information handling.
58 lines
1.5 KiB
C#
58 lines
1.5 KiB
C#
namespace EnvelopeGenerator.Application.Common.Dto;
|
|
|
|
public sealed record PdfSignaturePrincipalDto(
|
|
string? CommonName,
|
|
string? Organization,
|
|
string? Country,
|
|
string? Full);
|
|
|
|
public sealed record PdfSignatureCertificateInfoDto(
|
|
PdfSignaturePrincipalDto IssuedTo,
|
|
PdfSignaturePrincipalDto IssuedBy,
|
|
string? SerialNumber,
|
|
DateTimeOffset? ValidFrom,
|
|
DateTimeOffset? ValidTo,
|
|
bool SelfSigned,
|
|
bool Expired,
|
|
bool NotYetValid,
|
|
bool IsSigner,
|
|
int? Version,
|
|
string? KeyAlgorithm,
|
|
string? SignatureAlgorithm,
|
|
string? Pem,
|
|
int? KeySizeBits);
|
|
|
|
public sealed record PdfSignatureCheckItemDto(
|
|
bool CoversWholeDoc,
|
|
string? Reason,
|
|
string? BusinessReason,
|
|
string? Location,
|
|
string? DeclaredName,
|
|
string? ContactInfo,
|
|
string? Email,
|
|
string? Phone,
|
|
string? DigestAlgorithm,
|
|
string? SignatureAlgorithm,
|
|
string? SignerName,
|
|
string? Issuer,
|
|
string? SerialNumber,
|
|
DateTimeOffset? ValidFrom,
|
|
DateTimeOffset? ValidTo,
|
|
string ExpiryCheckedAgainst,
|
|
IReadOnlyList<PdfSignatureCertificateInfoDto> Certificates,
|
|
bool Unchanged,
|
|
string? FieldName,
|
|
bool IsCryptographicallyValid,
|
|
string? SigningTime,
|
|
string? Filter,
|
|
string? SubFilter,
|
|
string? ApplicationName,
|
|
string? UUID,
|
|
string? OriginalDocumentSha256,
|
|
string? MessageDigestHex,
|
|
string? Error);
|
|
|
|
public sealed record PdfSignatureCheckResultDto(
|
|
bool Signed,
|
|
IReadOnlyList<PdfSignatureCheckItemDto> Signatures);
|