addCertificate method

void addCertificate(
  1. X509Certificate certificate, {
  2. String? source,
})

Adds certificate as an anchor. source names the list it came from (e.g. "EU Trusted List"), reported back by sourceOf.

Implementation

void addCertificate(X509Certificate certificate, {String? source}) {
  anchors.add(certificate);
  if (source != null) _sources[_key(certificate)] ??= source;
}