Gio.TlsCertificate.new_from_pem
function new_from_pem(data: String, length: Number(gssize)): Gio.TlsCertificate {
// Gjs wrapper for g_tls_certificate_new_from_pem()
}
Creates a new Gio.TlsCertificate from the PEM-encoded data in data. If data includes both a certificate and a private key, then the returned certificate will include the private key data as well. (See the Gio.TlsCertificate.private_key_pem property for information about supported formats.)
If data includes multiple certificates, only the first one will be parsed.
Since 2.28
- data
PEM-encoded certificate data
- length
the length of data, or -1 if it's 0-terminated.
- Returns
the new certificate, or null if data is invalid