Sets the set of trusted X509 certificates used by SecureSocket client connections, when connecting to a secure server.
There are two ways to set a set of trusted certificates, with a single PEM file, or with a directory containing individual PEM files for certificates.
file
is an optional PEM file containing X509 certificates, usually
root certificates from certificate authorities.
directory
is an optional directory containing PEM files. The directory
must also have filesystem links added, which link extra filenames based
on the hash of a certificate's distinguished name (DN) to the file
containing that certificate. OpenSSL contains a tool called c_rehash
to create these links in a directory.
Source
void setTrustedCertificates({String file, String directory});