diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-13 22:15:00 +0800 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-08-13 22:22:25 +0800 |
commit | 2d6a216618624813b28495701d50c184c9934d77 (patch) | |
tree | b096d5450bdcc4896b0111dac4d896048876d837 /libempathy/empathy-tls-verifier.c | |
parent | 48973a29e5016c9e88b3b19fdfe8e31856ce9cf5 (diff) | |
download | gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar.gz gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar.bz2 gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar.lz gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar.xz gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.tar.zst gsoc2013-empathy-2d6a216618624813b28495701d50c184c9934d77.zip |
Build the right path when looking at user certs
Diffstat (limited to 'libempathy/empathy-tls-verifier.c')
-rw-r--r-- | libempathy/empathy-tls-verifier.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/libempathy/empathy-tls-verifier.c b/libempathy/empathy-tls-verifier.c index e85d8a750..b71e54828 100644 --- a/libempathy/empathy-tls-verifier.c +++ b/libempathy/empathy-tls-verifier.c @@ -484,16 +484,18 @@ build_gnutls_ca_and_crl_lists (GIOSchedulerJob *job, } else { - const gchar *cert_path; + const gchar *cert_name; - while ((cert_path = g_dir_read_name (dir)) != NULL) + while ((cert_name = g_dir_read_name (dir)) != NULL) { - gchar *contents = NULL; + gchar *contents = NULL, *cert_path = NULL; gsize length = 0; gint res; gnutls_datum_t datum = { NULL, 0 }; gnutls_x509_crt_t cert; + cert_path = g_build_filename (user_certs_dir, cert_name, NULL); + g_file_get_contents (cert_path, &contents, &length, &error); if (error != NULL) @@ -502,6 +504,7 @@ build_gnutls_ca_and_crl_lists (GIOSchedulerJob *job, cert_path, error->message); g_clear_error (&error); + g_free (cert_path); continue; } @@ -522,6 +525,7 @@ build_gnutls_ca_and_crl_lists (GIOSchedulerJob *job, } g_free (contents); + g_free (cert_path); } g_dir_close (dir); |