import { PdfArray } from '../core/objects/pdf-array.js'; import { PdfDate } from '../core/objects/pdf-date.js'; import { PdfDictionary } from '../core/objects/pdf-dictionary.js'; import { PdfIndirectObject } from '../core/objects/pdf-indirect-object.js'; import { PdfName } from '../core/objects/pdf-name.js'; import { PdfObjectReference } from '../core/objects/pdf-object-reference.js'; import { PdfStream } from '../core/objects/pdf-stream.js'; import { PdfString } from '../core/objects/pdf-string.js'; import { ByteArray } from '../types.js'; import { RevocationInfo } from './types.js'; /** * Indirect object containing a certificate stream. */ export declare class PdfCertObject extends PdfIndirectObject { } /** * Indirect object containing a CRL stream. */ export declare class PdfCrlObject extends PdfIndirectObject { } /** * Indirect object containing an OCSP response stream. */ export declare class PdfOcspObject extends PdfIndirectObject { } /** * Validation Related Information (VRI) dictionary. * Associates revocation data with specific certificate hashes. */ export type PdfVriObject = PdfIndirectObject; Cert?: PdfObjectReference>; OCSP?: PdfObjectReference>; CRL?: PdfObjectReference>; TU?: PdfDate; TS?: PdfString; }>; }>>; /** * Dictionary for the Document Security Store (DSS). * Contains arrays of certificates, CRLs, OCSPs, and VRI entries. */ export declare class PdfDocumentSecurityStoreDictionary extends PdfDictionary<{ Type?: PdfName<'DSS'>; VRI?: PdfObjectReference; OCSPs?: PdfArray>>; CRLs?: PdfArray>>; Certs?: PdfArray>>; }> { } /** * Document Security Store (DSS) object for PAdES LTV signatures. * Stores validation data (certificates, CRLs, OCSPs) for long-term validation. * * @example * ```typescript * const dss = new PdfDocumentSecurityStoreObject(document) * dss.addCert(certificateBytes) * dss.addCrl(crlBytes) * dss.addOcsp(ocspBytes) * ``` */ export declare class PdfDocumentSecurityStoreObject extends PdfIndirectObject { /** * Creates a new DSS object. * * @param document - The parent PDF document. * @param content - Optional pre-existing DSS dictionary. */ constructor(content?: PdfDocumentSecurityStoreDictionary); /** * Adds an OCSP response to the DSS, avoiding duplicates. * * @param ocsp - The DER-encoded OCSP response. * @returns The created or existing OCSP object. */ addOcsp(ocsp: ByteArray): PdfOcspObject; /** * Adds a CRL to the DSS, avoiding duplicates. * * @param crl - The DER-encoded CRL. * @returns The created or existing CRL object. */ addCrl(crl: ByteArray): PdfCrlObject; /** * Adds a certificate to the DSS, avoiding duplicates. * * @param cert - The DER-encoded certificate. * @returns The created or existing certificate object. */ addCert(cert: ByteArray): PdfCertObject; /** * Adds revocation information (CRLs and OCSPs) to the DSS. * * @param revocationInfo - The revocation information to add. */ addRevocationInfo(revocationInfo: RevocationInfo): void; /** * Checks if the DSS is empty (contains no certificates, CRLs, or OCSPs). * * @returns True if the DSS has no stored data. */ isEmpty(): boolean; }