summaryrefslogtreecommitdiff
path: root/src/core/servers-setup.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@0x90.dk>2015-04-17 21:10:00 +0200
committerAlexander Færøy <ahf@0x90.dk>2015-04-17 21:10:00 +0200
commitef5ac430c75a3a551991aff8dae08ceeaca25d3f (patch)
treee029e945b61272fbe48b628de1678edfb9938735 /src/core/servers-setup.c
parent9ffe52ec5e3f0643e7ddd12f4d21c0788d2f8cea (diff)
parent349ed35ce099d9003078e000acf5d95b5fd644e8 (diff)
downloadirssi-ef5ac430c75a3a551991aff8dae08ceeaca25d3f.zip
Merge pull request #238 from hloeung/master
ssl: Add option to specify SSL cipher suite preference list
Diffstat (limited to 'src/core/servers-setup.c')
-rw-r--r--src/core/servers-setup.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/servers-setup.c b/src/core/servers-setup.c
index 27d9f1f0..6cf48300 100644
--- a/src/core/servers-setup.c
+++ b/src/core/servers-setup.c
@@ -179,6 +179,8 @@ static void server_setup_fill_server(SERVER_CONNECT_REC *conn,
conn->ssl_cafile = g_strdup(sserver->ssl_cafile);
if (conn->ssl_capath == NULL && sserver->ssl_capath != NULL && sserver->ssl_capath[0] != '\0')
conn->ssl_capath = g_strdup(sserver->ssl_capath);
+ if (conn->ssl_ciphers == NULL && sserver->ssl_ciphers != NULL && sserver->ssl_ciphers[0] != '\0')
+ conn->ssl_ciphers = g_strdup(sserver->ssl_ciphers);
server_setup_fill_reconn(conn, sserver);
@@ -405,6 +407,7 @@ static SERVER_SETUP_REC *server_setup_read(CONFIG_NODE *node)
rec->ssl_verify = config_node_get_bool(node, "ssl_verify", FALSE);
rec->ssl_cafile = g_strdup(config_node_get_str(node, "ssl_cafile", NULL));
rec->ssl_capath = g_strdup(config_node_get_str(node, "ssl_capath", NULL));
+ rec->ssl_ciphers = g_strdup(config_node_get_str(node, "ssl_ciphers", NULL));
if (rec->ssl_cafile || rec->ssl_capath)
rec->ssl_verify = TRUE;
if (rec->ssl_cert != NULL || rec->ssl_verify)
@@ -445,6 +448,7 @@ static void server_setup_save(SERVER_SETUP_REC *rec)
iconfig_node_set_bool(node, "ssl_verify", rec->ssl_verify);
iconfig_node_set_str(node, "ssl_cafile", rec->ssl_cafile);
iconfig_node_set_str(node, "ssl_capath", rec->ssl_capath);
+ iconfig_node_set_str(node, "ssl_ciphers", rec->ssl_ciphers);
iconfig_node_set_str(node, "own_host", rec->own_host);
iconfig_node_set_str(node, "family",
@@ -486,6 +490,7 @@ static void server_setup_destroy(SERVER_SETUP_REC *rec)
g_free_not_null(rec->ssl_pass);
g_free_not_null(rec->ssl_cafile);
g_free_not_null(rec->ssl_capath);
+ g_free_not_null(rec->ssl_ciphers);
g_free(rec->address);
g_free(rec);
}