diff options
author | Timo Sirainen <cras@irssi.org> | 2003-11-16 17:53:55 +0000 |
---|---|---|
committer | cras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564> | 2003-11-16 17:53:55 +0000 |
commit | 43b0d36ee182f48cd655187a63411045aa04c948 (patch) | |
tree | e0b965b871ab3563ab46ed87bf9d675b8e353bd8 /src/fe-common/irc/fe-irc-server.c | |
parent | b1e2d7b5ef4837b8433c1bf5e68c629babe280d0 (diff) | |
download | irssi-43b0d36ee182f48cd655187a63411045aa04c948.zip |
Support for sending SSL certificate to server and optionally verify server's
certificate. See the -ssl_* options for /SERVER and /SERVER ADD. Patch by
Joel Eriksson <je-irssi@bitnux.com>.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@3146 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-common/irc/fe-irc-server.c')
-rw-r--r-- | src/fe-common/irc/fe-irc-server.c | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/src/fe-common/irc/fe-irc-server.c b/src/fe-common/irc/fe-irc-server.c index 44563000..a07ff6d0 100644 --- a/src/fe-common/irc/fe-irc-server.c +++ b/src/fe-common/irc/fe-irc-server.c @@ -50,9 +50,11 @@ const char *get_visible_target(IRC_SERVER_REC *server, const char *target) return target; } -/* SYNTAX: SERVER ADD [-4 | -6] [-ssl] [-auto | -noauto] [-ircnet <ircnet>] - [-host <hostname>] [-cmdspeed <ms>] [-cmdmax <count>] - [-port <port>] <address> [<port> [<password>]] */ +/* SYNTAX: SERVER ADD [-4 | -6] [-ssl] [-ssl_cert <cert>] [-ssl_pkey <pkey>] + [-ssl_verify] [-ssl_cafile <cafile>] [-ssl_capath <capath>] + [-auto | -noauto] [-ircnet <ircnet>] [-host <hostname>] + [-cmdspeed <ms>] [-cmdmax <count>] [-port <port>] + <address> [<port> [<password>]] */ static void sig_server_add_fill(IRC_SERVER_SETUP_REC *rec, GHashTable *optlist) { @@ -98,8 +100,21 @@ static void cmd_server_list(const char *data) g_string_append(str, "autoconnect, "); if (rec->no_proxy) g_string_append(str, "noproxy, "); - if (rec->use_ssl) - g_string_append(str, "SSL, "); + if (rec->use_ssl) { + g_string_append(str, "ssl, "); + if (rec->ssl_cert) { + g_string_sprintfa(str, "ssl_cert: %s, ", rec->ssl_cert); + if (rec->ssl_pkey) + g_string_sprintfa(str, "ssl_pkey: %s, ", rec->ssl_pkey); + } + if (rec->ssl_verify) + g_string_append(str, "ssl_verify, "); + if (rec->ssl_cafile) + g_string_sprintfa(str, "ssl_cafile: %s, ", rec->ssl_cafile); + if (rec->ssl_capath) + g_string_sprintfa(str, "ssl_capath: %s, ", rec->ssl_capath); + + } if (rec->max_cmds_at_once > 0) g_string_sprintfa(str, "cmdmax: %d, ", rec->max_cmds_at_once); if (rec->cmd_queue_speed > 0) |