Added check for RSA support in QCA.

It was crashing KDED for some users when not present.
This commit is contained in:
Albert Vaca 2013-10-05 15:55:25 +02:00
parent 5cac14bc96
commit fc45b64362

View file

@ -23,6 +23,7 @@
#include "networkpackage.h"
#include "backends/lan/lanlinkprovider.h"
#include "backends/online/onlinelinkprovider.h"
#include "backends/loopback/loopbacklinkprovider.h"
#include <QUuid>
@ -51,6 +52,14 @@ Daemon::Daemon(QObject *parent, const QList<QVariant>&)
qDebug() << "My id:" << uuid;
}
//qDebug() << "QCA supported capabilities:" << QCA::supportedFeatures().join(",");
if(!QCA::isSupported("rsa")) {
//TODO: Maybe display this in a more visible way?
qWarning() << "Error: KDE Connect could not find support for RSA in your QCA installation, if your distribution provides"
<< "separate packages for QCA-ossl and QCA-gnupg plugins, make sure you have them installed and try again";
return;
}
if (!config->group("myself").hasKey("privateKey") || !config->group("myself").hasKey("publicKey")) {
//http://delta.affinix.com/docs/qca/rsatest_8cpp-example.html