diff options
Diffstat (limited to 'gio/gtlscertificate.c')
-rw-r--r-- | gio/gtlscertificate.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gio/gtlscertificate.c b/gio/gtlscertificate.c index 4374ac21a..4862bc99a 100644 --- a/gio/gtlscertificate.c +++ b/gio/gtlscertificate.c @@ -626,7 +626,7 @@ create_certificate_chain_from_list (GSList *pem_list, /* root will point to the last certificate in the file. */ if (!root) - root = cert; + root = g_object_ref (cert); pem = g_slist_next (pem); } @@ -641,6 +641,8 @@ create_certificate_chain_from_list (GSList *pem_list, g_clear_object (&cert); } + g_clear_object (&root); + return cert; } @@ -1119,6 +1121,8 @@ g_tls_certificate_get_issuer (GTlsCertificate *cert) * check a certificate against a CA that is not part of the system * CA database. * + * If @cert is valid, %G_TLS_CERTIFICATE_NO_FLAGS is returned. + * * If @identity is not %NULL, @cert's name(s) will be compared against * it, and %G_TLS_CERTIFICATE_BAD_IDENTITY will be set in the return * value if it does not match. If @identity is %NULL, that bit will |