addExternalSigner method

void addExternalSigner(
  1. IPdfExternalSigner signer,
  2. List<List<int>> publicCertificatesData
)

Add external signer for signature.

Implementation

void addExternalSigner(
    IPdfExternalSigner signer, List<List<int>> publicCertificatesData) {
  _helper.externalSigner = signer;
  _externalRootCert = publicCertificatesData;
  if (_externalRootCert != null) {
    final X509CertificateParser parser = X509CertificateParser();
    _helper.externalChain = <X509Certificate?>[];
    _externalRootCert!.toList().forEach((List<int> certRawData) => _helper
        .externalChain!
        .add(parser.readCertificate(PdfStreamReader(certRawData))));
  }
}