From: Joshua T Corbin Date: Thu, 8 Jan 2009 23:52:59 +0000 (-0500) Subject: Useful error message on certificate error. X-Git-Tag: 0.4.0~202 X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=commitdiff_plain;h=e5bff437f354b2fda47b541ca72b9ea911861205 Useful error message on certificate error. When the core is compiled with SSL support, but a certificate file is not present or invalid display a verbose warning pointing to the FAQ. --- diff --git a/src/core/sslserver.cpp b/src/core/sslserver.cpp index 2557f2ff..78adb82b 100644 --- a/src/core/sslserver.cpp +++ b/src/core/sslserver.cpp @@ -35,7 +35,12 @@ SslServer::SslServer(QObject *parent) : QTcpServer(parent) { - setCertificate(quasselDir().absolutePath() + "/quasselCert.pem"); + if (! setCertificate(quasselDir().absolutePath() + "/quasselCert.pem")) { + qWarning() + << "SslServer: Unable to set certificate file\n" + << " Quassel Core will still work, but cannot provide SSL for client connections.\n" + << " Please see http://quassel-irc.org/faq/cert to learn how to enable SSL support."; + } } QTcpSocket *SslServer::nextPendingConnection() {