TlsCertificate.from_file


Description:

[ 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.

Parameters:

file

file containing a certificate to import

Returns:

the new certificate, or null on error




2022 vala-language.org