summaryrefslogtreecommitdiff
path: root/src/core/network-openssl.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@0x90.dk>2016-10-16 13:46:58 +0200
committerAlexander Færøy <ahf@0x90.dk>2016-10-22 20:36:50 +0200
commit2be7289085d6969e6774ce3909f0224b1d689f93 (patch)
tree4df40e20182613125fc565b5aa0ba54e750efbe9 /src/core/network-openssl.c
parentda67d3e8e69eb5fb702a3dd39356d38a1ee9d8cd (diff)
downloadirssi-2be7289085d6969e6774ce3909f0224b1d689f93.zip
Rename SSL to TLS.
This patch changes the internal name of SSL to TLS. We also add -tls_* options to /CONNECT and /SERVER, but make sure that the -ssl_* versions of the commands continue to work like before.
Diffstat (limited to 'src/core/network-openssl.c')
-rw-r--r--src/core/network-openssl.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/core/network-openssl.c b/src/core/network-openssl.c
index 014f0a28..82fd65b0 100644
--- a/src/core/network-openssl.c
+++ b/src/core/network-openssl.c
@@ -455,13 +455,13 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
SSL *ssl;
SSL_CTX *ctx = NULL;
- const char *mycert = server->connrec->ssl_cert;
- const char *mypkey = server->connrec->ssl_pkey;
- const char *mypass = server->connrec->ssl_pass;
- const char *cafile = server->connrec->ssl_cafile;
- const char *capath = server->connrec->ssl_capath;
- const char *ciphers = server->connrec->ssl_ciphers;
- gboolean verify = server->connrec->ssl_verify;
+ const char *mycert = server->connrec->tls_cert;
+ const char *mypkey = server->connrec->tls_pkey;
+ const char *mypass = server->connrec->tls_pass;
+ const char *cafile = server->connrec->tls_cafile;
+ const char *capath = server->connrec->tls_capath;
+ const char *ciphers = server->connrec->tls_ciphers;
+ gboolean verify = server->connrec->tls_verify;
g_return_val_if_fail(handle != NULL, NULL);
@@ -480,7 +480,8 @@ static GIOChannel *irssi_ssl_get_iochannel(GIOChannel *handle, int port, SERVER_
SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2 | SSL_OP_NO_SSLv3);
SSL_CTX_set_default_passwd_cb(ctx, get_pem_password_callback);
SSL_CTX_set_default_passwd_cb_userdata(ctx, (void *)mypass);
- if (ciphers && *ciphers) {
+
+ if (ciphers != NULL && ciphers[0] != '\0') {
if (SSL_CTX_set_cipher_list(ctx, ciphers) != 1)
g_warning("No valid SSL cipher suite could be selected");
}