Commented out old encryption functions
This commit is contained in:
parent
d69cdce4c1
commit
2e4ce90656
5 changed files with 12 additions and 18 deletions
|
@ -99,12 +99,6 @@ void LanDeviceLink::dataReceived()
|
|||
return;
|
||||
}
|
||||
|
||||
if (!package.isEncrypted()) {
|
||||
qWarning() << "Received plain-text package from paired link, ignoring!";
|
||||
}
|
||||
|
||||
package.decrypt(mPrivateKey, &package);
|
||||
|
||||
if (package.hasPayloadTransferInfo()) {
|
||||
//qCDebug(KDECONNECT_CORE) << "HasPayloadTransferInfo";
|
||||
QVariantMap transferInfo = package.payloadTransferInfo();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <QDataStream>
|
||||
#include <QDateTime>
|
||||
#include <QJsonDocument>
|
||||
#include <QtCrypto>
|
||||
//#include <QtCrypto>
|
||||
#include <QDebug>
|
||||
|
||||
#include "dbushelper.h"
|
||||
|
@ -35,7 +35,7 @@
|
|||
#include "pluginloader.h"
|
||||
#include "kdeconnectconfig.h"
|
||||
|
||||
const QCA::EncryptionAlgorithm NetworkPackage::EncryptionAlgorithm = QCA::EME_PKCS1v15;
|
||||
//const QCA::EncryptionAlgorithm NetworkPackage::EncryptionAlgorithm = QCA::EME_PKCS1v15;
|
||||
const int NetworkPackage::ProtocolVersion = 6;
|
||||
|
||||
NetworkPackage::NetworkPackage(const QString& type)
|
||||
|
@ -159,7 +159,7 @@ bool NetworkPackage::unserialize(const QByteArray& a, NetworkPackage* np)
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void NetworkPackage::encrypt(QCA::PublicKey& key)
|
||||
{
|
||||
|
||||
|
@ -213,7 +213,7 @@ bool NetworkPackage::decrypt(QCA::PrivateKey& key, NetworkPackage* out) const
|
|||
return true;
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
FileTransferJob* NetworkPackage::createPayloadTransferJob(const QUrl &destination) const
|
||||
{
|
||||
return new FileTransferJob(payload(), payloadSize(), destination);
|
||||
|
|
|
@ -26,9 +26,8 @@
|
|||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QVariant>
|
||||
#include <QStringList>
|
||||
#include <QIODevice>
|
||||
#include <QtCrypto>
|
||||
//#include <QtCrypto>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
|
||||
|
@ -48,7 +47,7 @@ class KDECONNECTCORE_EXPORT NetworkPackage : public QObject
|
|||
|
||||
public:
|
||||
|
||||
const static QCA::EncryptionAlgorithm EncryptionAlgorithm;
|
||||
//const static QCA::EncryptionAlgorithm EncryptionAlgorithm;
|
||||
const static int ProtocolVersion;
|
||||
|
||||
explicit NetworkPackage(const QString& type);
|
||||
|
@ -58,8 +57,8 @@ public:
|
|||
QByteArray serialize() const;
|
||||
static bool unserialize(const QByteArray& json, NetworkPackage* out);
|
||||
|
||||
void encrypt(QCA::PublicKey& key);
|
||||
bool decrypt(QCA::PrivateKey& key, NetworkPackage* out) const;
|
||||
//void encrypt(QCA::PublicKey& key);
|
||||
//bool decrypt(QCA::PrivateKey& key, NetworkPackage* out) const;
|
||||
bool isEncrypted() const { return mType == PACKAGE_TYPE_ENCRYPTED; }
|
||||
|
||||
const QString& id() const { return mId; }
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "core/networkpackage.h"
|
||||
|
||||
#include <QtTest>
|
||||
#include <QtCrypto>
|
||||
|
||||
QTEST_GUILESS_MAIN(NetworkPackageTests);
|
||||
|
||||
|
@ -88,7 +89,7 @@ void NetworkPackageTests::networkPackageIdentityTest()
|
|||
QCOMPARE( np.type() , PACKAGE_TYPE_IDENTITY );
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
void NetworkPackageTests::networkPackageEncryptionTest()
|
||||
{
|
||||
QCA::Initializer init;
|
||||
|
@ -140,7 +141,7 @@ void NetworkPackageTests::networkPackageEncryptionTest()
|
|||
QCOMPARE(QString(decryptedJson), QString(json));
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
void NetworkPackageTests::cleanupTestCase()
|
||||
{
|
||||
|
|
|
@ -33,7 +33,7 @@ private Q_SLOTS:
|
|||
void dummyTest();
|
||||
void networkPackageTest();
|
||||
void networkPackageIdentityTest();
|
||||
void networkPackageEncryptionTest();
|
||||
//void networkPackageEncryptionTest();
|
||||
|
||||
void cleanupTestCase();
|
||||
|
||||
|
|
Loading…
Reference in a new issue