# HG changeset patch # User Mikael Berthe # Date 1195420128 -3600 # Node ID 6d4770f35ddde6fa84150116f0a49c7692ae3c26 # Parent acf5bbdddfc00ae1b525ad7da7686e08a729b04c 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. diff -r acf5bbdddfc0 -r 6d4770f35ddd mcabber/src/main.c --- 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);