aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--ChangeLog.ja7
-rw-r--r--libsylph/ssl.c18
-rw-r--r--src/main.c11
4 files changed, 34 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index f3de9116..d48c703e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-12-13
+ * libsylph/ssl.c: ssl_init(): read /etc/ssl/certs if exist.
+ * src/main.c: call sock_init() and ssl_init() after parse_cmd_opt()
+ for debug option.
+
+2006-12-13
+
* src/compose.c: compose_reedit(): place cursor at the top of the
text. Set the default focus to To or Subject entry if they're empty.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 42c9feb0..cd73b445 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,12 @@
2006-12-13
+ * libsylph/ssl.c: ssl_init(): /etc/ssl/certs が存在すれば読み込む
+ ようにした。
+ * src/main.c: parse_cmd_opt() の後に sock_init() と ssl_init() を
+ 呼ぶようにした(デバッグオプションのため)。
+
+2006-12-13
+
* src/compose.c: compose_reedit(): カーソルをテキストの先頭に配置
するようにした。 To または Subject が空の場合はそれらのエントリに
デフォルトでフォーカスするようにした。
diff --git a/libsylph/ssl.c b/libsylph/ssl.c
index 7b3c5c17..80808d1b 100644
--- a/libsylph/ssl.c
+++ b/libsylph/ssl.c
@@ -48,11 +48,25 @@ void ssl_init(void)
certs_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "certs", NULL);
if (!is_dir_exist(certs_dir)) {
- debug_print("%s doesn't exist, or not a directory.\n",
+ debug_print("ssl_init(): %s doesn't exist, or not a directory.\n",
certs_dir);
g_free(certs_dir);
- certs_dir = NULL;
+#ifdef G_OS_WIN32
+ certs_dir = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S
+ "etc" G_DIR_SEPARATOR_S
+ "ssl" G_DIR_SEPARATOR_S "certs", NULL);
+#else
+ certs_dir = g_strdup("/etc/ssl/certs");
+#endif
+ if (!is_dir_exist(certs_dir)) {
+ debug_print("ssl_init(): %s doesn't exist, or not a directory.\n",
+ certs_dir);
+ g_free(certs_dir);
+ certs_dir = NULL;
+ }
}
+ if (certs_dir)
+ debug_print("ssl_init(): certs dir %s found.\n", certs_dir);
ssl_ctx_SSLv23 = SSL_CTX_new(SSLv23_client_method());
if (ssl_ctx_SSLv23 == NULL) {
diff --git a/src/main.c b/src/main.c
index 54f2c318..6739ee2a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -173,6 +173,11 @@ int main(int argc, char *argv[])
app_init();
parse_cmd_opt(argc, argv);
+ sock_init();
+#if USE_SSL
+ ssl_init();
+#endif
+
/* check and create (unix domain) socket for remote operation */
lock_socket = prohibit_duplicate_launch();
if (lock_socket < 0) return 0;
@@ -524,11 +529,6 @@ static void app_init(void)
bind_textdomain_codeset(PACKAGE, CS_UTF_8);
textdomain(PACKAGE);
- sock_init();
-#if USE_SSL
- ssl_init();
-#endif
-
#ifdef G_OS_UNIX
/* ignore SIGPIPE signal for preventing sudden death of program */
signal(SIGPIPE, SIG_IGN);
@@ -698,7 +698,6 @@ void app_will_exit(gboolean force)
#if USE_SSL
ssl_done();
#endif
-
cleanup_console();
sock_cleanup();