[ CCode ( has_construct_function = false ) ]
public TlsCertificate.from_file (string file) throws Error
Creates a TlsCertificate from the data in file
.
As of 2.72, if the filename ends in `.p12` or `.pfx` the data is loaded by TlsCertificate.from_pkcs12 otherwise it is loaded by TlsCertificate.from_pem. See those functions for exact details.
If file
cannot be read or parsed, the function will return null and set
throws.
file |
file containing a certificate to import |
the new certificate, or null on error |