Sets the set of trusted X509 certificates used by SecureSocket client connections, when connecting to a secure server.
file is the path to a PEM or PKCS12 file containing X509 certificates,
usually root certificates from certificate authorities. For PKCS12 files,
password is the password for the file. For PEM files, password is
ignored. Assuming it is well-formatted, all other contents of file are
ignored.
NB: This function calls ReadFileAsBytesSync, and will block on file IO.
Prefer using setTrustedCertificatesBytes.
Source
void setTrustedCertificates(String file, {String password});