Gio.TlsCertificate.new_from_file

function new_from_file(file: String): Gio.TlsCertificate {
    // Gjs wrapper for g_tls_certificate_new_from_file()
}
  

Creates a Gio.TlsCertificate from the PEM-encoded data in file. If file cannot be read or parsed, the function will return null and set @error. Otherwise, this behaves like Gio.TlsCertificate.new_from_pem.

Since 2.28

file

file containing a PEM-encoded certificate to import

Returns

the new certificate, or null on error