validateWithTrustProfiles method
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),
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,
);
}