TlsCertificate.this

Creates a #GTlsCertificate from the PEM-encoded data in @file. The returned certificate will be the first certificate found in @file. As of GLib 2.44, if @file contains more certificates it will try to load a certificate chain. All certificates will be verified in the order found (top-level certificate should be the last one in the file) and the #GTlsCertificate:issuer property of each certificate will be set accordingly if the verification succeeds. If any certificate in the chain cannot be verified, the first certificate in the file will still be returned.

If @file cannot be read or parsed, the function will return %NULL and set @error. Otherwise, this behaves like g_tls_certificate_new_from_pem().

Parameters

file string

file containing a PEM-encoded certificate to import

Return: the new certificate, or %NULL on error

Throws

GException on failure. ConstructionException GTK+ fails to create the object.

Meta

Since

2.28