TlsCertificate.newFromFile

Creates a #GTlsCertificate from the data in file.

As of 2.72, if the filename ends in .p12 or .pfx the data is loaded by gio.tls_certificate.TlsCertificate.newFromPkcs12 otherwise it is loaded by gio.tls_certificate.TlsCertificate.newFromPem. See those functions for exact details.

If file cannot be read or parsed, the function will return null and set error.

class TlsCertificate
static
newFromFile
(
string file
)

Parameters

file string

file containing a certificate to import

Return Value

Type: gio.tls_certificate.TlsCertificate

the new certificate, or null on error