about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--src/config/cafile.c2
-rw-r--r--src/tools/http_download.c2
-rw-r--r--src/tools/http_upload.c2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/config/cafile.c b/src/config/cafile.c
index 4ac832bf..2bb3c4d0 100644
--- a/src/config/cafile.c
+++ b/src/config/cafile.c
@@ -33,6 +33,8 @@
  *
  */
 
+#include "config.h"
+
 #include <fcntl.h>
 #include <glib.h>
 #include <errno.h>
diff --git a/src/tools/http_download.c b/src/tools/http_download.c
index 57e36e61..bbbccce1 100644
--- a/src/tools/http_download.c
+++ b/src/tools/http_download.c
@@ -128,7 +128,7 @@ http_file_get(void* userdata)
     char* cert_path = prefs_get_string(PREF_TLS_CERTPATH);
     gchar* cafile = cafile_get_name();
     ProfAccount* account = accounts_get_account(session_get_account_name());
-    gboolean insecure = strcmp(account->tls_policy, "trust") == 0;
+    gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
     account_free(account);
     pthread_mutex_unlock(&lock);
 
diff --git a/src/tools/http_upload.c b/src/tools/http_upload.c
index 5b783441..4dae41c5 100644
--- a/src/tools/http_upload.c
+++ b/src/tools/http_upload.c
@@ -187,7 +187,7 @@ http_file_put(void* userdata)
     char* cert_path = prefs_get_string(PREF_TLS_CERTPATH);
     gchar* cafile = cafile_get_name();
     ProfAccount* account = accounts_get_account(session_get_account_name());
-    gboolean insecure = strcmp(account->tls_policy, "trust") == 0;
+    gboolean insecure = account->tls_policy && strcmp(account->tls_policy, "trust") == 0;
     account_free(account);
     pthread_mutex_unlock(&lock);
 
amp;id=69e97c429fb0d9f25cf1f2dc7d19e42123b0bf72'>^
a66c4a26 ^


f027adc0 ^
5c210a96 ^

3de15ddd ^

5c210a96 ^



3d566884 ^
a1d7ed6e ^
3d566884 ^
f8e96a97 ^
465bff73 ^





f027adc0 ^
f8e96a97 ^

0b5c4cbe ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49