Useful error message on certificate error.
authorJoshua T Corbin <jcorbin@wunjo.org>
Thu, 8 Jan 2009 23:52:59 +0000 (18:52 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Fri, 16 Jan 2009 19:47:10 +0000 (20:47 +0100)
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.

src/core/sslserver.cpp

index 2557f2f..78adb82 100644 (file)
 SslServer::SslServer(QObject *parent)
   : QTcpServer(parent)
 {
 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() {
 }
 
 QTcpSocket *SslServer::nextPendingConnection() {