validateWithTrustProfiles method

Future<PdfValidationWithProfilesResult> validateWithTrustProfiles(
  1. Uint8List pdfBytes, {
  2. PdfSignaturePreparedContext? preparedContext,
  3. required List<PdfTrustProfile> trustProfiles,
  4. bool strictRevocation = false,
  5. bool fetchCrls = false,
  6. bool fetchOcsp = false,
  7. bool validateTemporal = false,
  8. bool temporalUseSigningTime = false,
  9. DateTime? validationTime,
  10. bool temporalExpiredNeedsLtv = true,
  11. PdfRevocationDataProvider? revocationDataProvider,
  12. bool includeCertificates = true,
  13. bool includeSignatureFields = true,
  14. PdfLpa? lpa,
  15. Map<String, String>? policyDisplayMap,
  16. PdfValidationCacheHooks? cacheHooks,
  17. Duration cacheTtl = const Duration(minutes: 2),
})

Implementation

Future<PdfValidationWithProfilesResult> validateWithTrustProfiles(
  Uint8List pdfBytes, {
  PdfSignaturePreparedContext? preparedContext,
  required List<PdfTrustProfile> trustProfiles,
  bool strictRevocation = false,
  bool fetchCrls = false,
  bool fetchOcsp = false,
  bool validateTemporal = false,
  bool temporalUseSigningTime = false,
  DateTime? validationTime,
  bool temporalExpiredNeedsLtv = true,
  PdfRevocationDataProvider? revocationDataProvider,
  bool includeCertificates = true,
  bool includeSignatureFields = true,
  PdfLpa? lpa,
  Map<String, String>? policyDisplayMap,
  PdfValidationCacheHooks? cacheHooks,
  Duration cacheTtl = const Duration(minutes: 2),
}) async {
  final index = await PdfTrustedRootsIndex.build(
    trustProfiles
        .map((p) => PdfTrustedRootsSource(id: p.id, provider: p.provider))
        .toList(growable: false),
  );

  return _validateWithPreparedTrustIndex(
    pdfBytes,
    trustProfiles: trustProfiles,
    trustIndex: index,
    strictRevocation: strictRevocation,
    fetchCrls: fetchCrls,
    fetchOcsp: fetchOcsp,
    validateTemporal: validateTemporal,
    temporalUseSigningTime: temporalUseSigningTime,
    validationTime: validationTime,
    temporalExpiredNeedsLtv: temporalExpiredNeedsLtv,
    revocationDataProvider: revocationDataProvider,
    includeCertificates: includeCertificates,
    includeSignatureFields: includeSignatureFields,
    lpa: lpa,
    policyDisplayMap: policyDisplayMap,
    cacheHooks: cacheHooks,
    cacheTtl: cacheTtl,
    preparedContext: preparedContext,
  );
}