+ static bool sslWarningShown = false;
+
+ QString ssl_cert;
+ QString ssl_key;
+
+ if(Quassel::isOptionSet("ssl-cert")) {
+ ssl_cert = Quassel::optionValue("ssl-cert");
+ } else {
+ ssl_cert = Quassel::configDirPath() + "quasselCert.pem";
+ }
+
+ if(Quassel::isOptionSet("ssl-key")) {
+ ssl_key = Quassel::optionValue("ssl-key");
+ } else {
+ ssl_key = ssl_cert;
+ }
+
+ if (!setCertificate(ssl_cert, ssl_key)) {
+ if (!sslWarningShown) {
+ quWarning()
+ << "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.";
+ sslWarningShown = true;
+ }
+ }