รีเคิร์ด THPDFSignatureInfo
บรรยายลายเซ็น PDF ที่โหลดไว้หนึ่งตัว ตั้งแต่ตัวตนของใบรับรอง การครอบคลุม byte range ไปจนถึงผลตัดสินการ verify
การประกาศ
THPDFSignatureInfo= record
FieldName: AnsiString; // signature form field partial name
SubFilter: AnsiString; // /SubFilter of the signature dictionary
SignerName: AnsiString; // CN of the signer certificate subject
SubjectDN: AnsiString; // rendered subject distinguished name
IssuerDN: AnsiString; // rendered issuer distinguished name
SerialNumberHex: AnsiString; // certificate serial number, hex encoded
ValidFrom: TDateTime; // certificate notBefore (0 when absent)
ValidTo: TDateTime; // certificate notAfter (0 when absent)
SigningTime: TDateTime; // signed attribute 1.2.840.113549.1.9.5,
// else the /M entry, else 0
HashAlgorithm: AnsiString; // SHA-1, SHA-2, SHA-3, or SHAKE256
DigestAlgorithmOID: AnsiString;
DigestConsistencyIssue: THPDFCMSDigestConsistencyIssue;
SignaturePolicy: THPDFSignaturePolicyInfo;
Reason: AnsiString; // /Reason from the signature dictionary
Location: AnsiString; // /Location
ContactInfo: AnsiString; // /ContactInfo
ByteRange: array of Int64; // /ByteRange pairs (offset, length, ...)
CoversWholeDocument: boolean; // ByteRange spans the file except /Contents
SignedRevisionLength: Int64; // source prefix covered by this signature
UnsignedTrailingBytes: Int64; // bytes appended after the signed revision
CertificateTimeValidity: THPDFSignatureTimeValidity;
Status: THPDFSignatureVerifyStatus;
PublicKeyAlgorithm: AnsiString; // RSA, ECDSA, EdDSA, or ML-DSA
SignatureAlgorithm: AnsiString; // CMS signature algorithm name
SignatureAlgorithmOID: AnsiString;
CurveName: AnsiString; // ECDSA curve, such as 'P-256'
Timestamp: THPDFTimestampInfo; // RFC 3161 signature or document timestamp
CMSAttributes: THPDFCMSAttributeSummary;
CertificateValidation: THPDFCertificateValidationInfo;
end;
ยูนิต
HPDFSignVerify
ฟิลด์
| ฟิลด์ | วัตถุประสงค์ |
|---|---|
FieldName | ชื่อบางส่วนของ form field ลายเซ็น |
SubFilter | ค่าของรายการ /SubFilter ใน signature dictionary |
SignerName | CN ของ subject ในใบรับรองผู้เซ็น |
SubjectDN | subject distinguished name ของใบรับรองในรูปแบบที่แสดงผล |
IssuerDN | issuer distinguished name ของใบรับรองในรูปแบบที่แสดงผล |
SerialNumberHex | เลข serial ของใบรับรอง เข้ารหัสแบบ hex |
ValidFrom | notBefore ของใบรับรอง เป็น 0 ถ้าไม่มี |
ValidTo | notAfter ของใบรับรอง เป็น 0 ถ้าไม่มี |
SigningTime | signed attribute 1.2.840.113549.1.9.5 ถ้าไม่มีใช้รายการ /M ถ้าไม่มีอีกเป็น 0 |
HashAlgorithm | ชื่อตระกูล digest: SHA-1, SHA-2, SHA-3 หรือ SHAKE256 |
DigestAlgorithmOID | object identifier ของอัลกอริทึม digest |
DigestConsistencyIssue | ตรวจพบว่าอัลกอริทึม digest ภายในโครงสร้าง CMS ไม่สอดคล้องกัน |
SignaturePolicy | รายละเอียด signature policy เมื่อลายเซ็นแนบ policy มาด้วย |
Reason | ค่าของรายการ /Reason |
Location | ค่าของรายการ /Location |
ContactInfo | ค่าของรายการ /ContactInfo |
ByteRange | คู่ offset กับความยาวของ /ByteRange ที่บรรยายช่วงไบต์ที่ครอบคลุม |
CoversWholeDocument | เป็น True เมื่อ byte range ครอบคลุมทั้งไฟล์ยกเว้นช่องว่าง /Contents |
SignedRevisionLength | ความยาวส่วนหัวของไฟล์ที่ลายเซ็นนี้ครอบคลุม |
UnsignedTrailingBytes | จำนวนไบต์ที่ต่อท้ายหลัง revision ที่เซ็นไว้ |
CertificateTimeValidity | เวลาที่เซ็นอยู่ในช่วงอายุของใบรับรองหรือไม่ |
Status | ผลตัดสินการ verify ชนิด THPDFSignatureVerifyStatus |
PublicKeyAlgorithm | ตระกูล public key: RSA, ECDSA, EdDSA หรือ ML-DSA |
SignatureAlgorithm | ชื่ออัลกอริทึมลายเซ็น CMS |
SignatureAlgorithmOID | object identifier ของอัลกอริทึมลายเซ็น |
CurveName | ชื่อ curve ของ ECDSA เช่น P-256 |
Timestamp | รายละเอียด timestamp ของลายเซ็นหรือเอกสารตาม RFC 3161 |
CMSAttributes | สรุป CMS attribute ที่เซ็นไว้ |
CertificateValidation | ผลการตรวจ certificate chain ของใบรับรอง |
หมายเหตุการใช้งาน
GetLoadedSignatureInfoคืนฟิลด์เชิงบรรยาย ส่วนVerifyLoadedSignatureกับVerifyLoadedSignatureExเติมฟิลด์สถานะและการตรวจหลังเช็ค digest เสร็จCoversWholeDocumentคู่กับUnsignedTrailingBytesบอกว่า revision ภายหลังแก้เอกสารหลังการเซ็นหรือไม่- record เดียวกันนี้ใช้ป้อนการตรวจใบรับรอง การเรียกครั้งเดียวจึงครอบคลุมทั้งตัวตน การครอบคลุม อัลกอริทึม และการเช็ค chain