[Commits] [SCM] claws branch, master, updated. 3.17.0-167-g85f10a0

Colin colin at claws-mail.org
Thu Nov 15 10:56:45 CET 2018


The branch, master has been updated
       via  85f10a0e2c357bb2d67cd41891aa06a7af818b49 (commit)
      from  b040d141d67d2fccf9e0fe56443edbfa3244ba13 (commit)

Summary of changes:
 src/common/ssl_certificate.c |   19 +++++++++++++------
 1 file changed, 13 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit 85f10a0e2c357bb2d67cd41891aa06a7af818b49
Author: Colin Leroy <colin at colino.net>
Date:   Thu Nov 15 10:56:23 2018 +0100

    Fix bug #4120, "New cert files are created in $HOME instead  of in ~/.claws-mail/certs"

diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c
index 28a554a..7d5d50a 100644
--- a/src/common/ssl_certificate.c
+++ b/src/common/ssl_certificate.c
@@ -55,17 +55,24 @@ gboolean prefs_common_unsafe_ssl_certs(void);
 static gchar *get_certificate_path(const gchar *host, const gchar *port, const gchar *fp)
 {
 	gchar *ret;
+	gchar *filename;
+
+	if (fp != NULL && prefs_common_unsafe_ssl_certs()) {
+		filename = g_strconcat(host, ".", port, ".", fp, ".cert", NULL);
+		subst_for_filename(filename);
 
-	if (fp != NULL && prefs_common_unsafe_ssl_certs())
 		ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
 			  "certs", G_DIR_SEPARATOR_S,
-			  host, ".", port, ".", fp, ".cert", NULL);
-	else 
+			  filename, NULL);
+	} else {
+		filename = g_strconcat(host, ".", port, ".cert", NULL);
+		subst_for_filename(filename);
+
 		ret = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S,
 			  "certs", G_DIR_SEPARATOR_S,
-			  host, ".", port, ".cert", NULL);
-
-	subst_for_filename(ret);
+			  filename, NULL);
+	}
+	g_free(filename);
 	return ret;
 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list