kdeconnect-kde/core/backends/loopback/loopbackdevicelink.h
Albert Vaca Cintora 97bde9ce5e Add a verification key that's displayed when pairing
The key is a sha256 of both devices' certificates. Both should generate the
same key, so hey user can check they are pairing against the right device.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
2020-11-26 11:28:32 +01:00

31 lines
753 B
C++

/**
* SPDX-FileCopyrightText: 2013 Albert Vaca <albertvaka@gmail.com>
*
* SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
*/
#ifndef LOOPBACKDEVICELINK_H
#define LOOPBACKDEVICELINK_H
#include "../devicelink.h"
#include <QSslCertificate>
class LoopbackLinkProvider;
class LoopbackDeviceLink
: public DeviceLink
{
Q_OBJECT
public:
LoopbackDeviceLink(const QString& d, LoopbackLinkProvider* a);
QString name() override;
bool sendPacket(NetworkPacket& np) override;
void userRequestsPair() override { setPairStatus(Paired); }
void userRequestsUnpair() override { setPairStatus(NotPaired); }
QSslCertificate certificate() const override { return QSslCertificate(); }
};
#endif