diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-13 04:33:15 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-12-13 04:33:15 +0000 |
commit | 0d93d2a44ee23d371f0e9536635d56109f340c83 (patch) | |
tree | 28c828f065c9c279100288fbd18d3aa166658ef2 | |
parent | f239571c2ad97975edaceb80845b97c5daa77593 (diff) |
read /etc/ssl/certs if exist.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1417 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 7 | ||||
-rw-r--r-- | libsylph/ssl.c | 18 | ||||
-rw-r--r-- | src/main.c | 11 |
4 files changed, 34 insertions, 8 deletions
@@ -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) { @@ -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(); |