Mercurial > hg
changeset 1370:6d4770f35ddd
Do not connect when the SSL settings can't be used (suggested by Till Maas)
For example, when mcabber is linked against GnuTLS it won't connect if
'ssl_verify' is not set to 0, as this is currently not supported.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 18 Nov 2007 22:08:48 +0100 |
parents | acf5bbdddfc0 |
children | 6ff264af7d94 |
files | mcabber/src/main.c |
diffstat | 1 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/src/main.c Sat Nov 17 11:35:23 2007 +0100 +++ b/mcabber/src/main.c Sun Nov 18 22:08:48 2007 +0100 @@ -114,16 +114,23 @@ ciphers = settings_opt_get("ssl_ciphers"); #if !defined(HAVE_OPENSSL) && !defined(HAVE_GNUTLS) - if (ssl || sslvopt || cafile || capath || ciphers) { - scr_LogPrint(LPRINT_LOGNORM, - "** Warning: SSL is NOT available, ignoring ssl-related setting"); + if (ssl) { + scr_LogPrint(LPRINT_LOGNORM, "** Error: SSL is NOT available, " + "do not set the option 'ssl'."); + return; + } else if (sslvopt || cafile || capath || ciphers) { + scr_LogPrint(LPRINT_LOGNORM, "** Warning: SSL is NOT available, " + "ignoring ssl-related settings"); ssl = sslverify = 0; cafile = capath = ciphers = NULL; } #elif defined HAVE_GNUTLS - if (sslverify >= 0) { - scr_LogPrint(LPRINT_LOGNORM, "Warning: SSL certificate checking " - "is not supported yet with GnuTLS"); + if (sslverify != 0) { + scr_LogPrint(LPRINT_LOGNORM, "** Error: SSL certificate checking " + "is not supported yet with GnuTLS."); + scr_LogPrint(LPRINT_LOGNORM, + " * Please set 'ssl_verify' to 0 explicitly!"); + return; } #endif cafile_xp = expand_filename(cafile);