diff options
author | Javier <dev.git@javispedro.com> | 2016-01-01 22:05:42 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2016-01-01 22:05:42 +0100 |
commit | a45977185a485624095bff1a15024e9199eee676 (patch) | |
tree | 6cc57d085bdd01e493477c870dbe0548137998e1 /wmspeer.h | |
parent | a24034bdfea259cdc09c74217be75d4f9de0dce5 (diff) | |
download | sapd-a45977185a485624095bff1a15024e9199eee676.tar.gz sapd-a45977185a485624095bff1a15024e9199eee676.zip |
reorganize source files into SAP and agents
Diffstat (limited to 'wmspeer.h')
-rw-r--r-- | wmspeer.h | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/wmspeer.h b/wmspeer.h deleted file mode 100644 index 446e747..0000000 --- a/wmspeer.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef WMSPEER_H -#define WMSPEER_H - -#include <QtCore/QObject> -#include <openssl/ec.h> - -#include "saprotocol.h" - -class WMSPeer : public QObject -{ - Q_OBJECT - -public: - WMSPeer(SAProtocol::Role role, const QString &localName, const QString &peerName, QObject *parent = 0); - ~WMSPeer(); - - SAProtocol::SecurityFrame respondToServerChallenge(const SAProtocol::SecurityFrame &challenge); - bool verifyServerResponse(const SAProtocol::SecurityFrame &challenge); - -private: - bool generateEccKey(); - - QByteArray computeSharedSecret(const QByteArray &remotePubKey) const; - QByteArray expandTemporaryKey(); - - static QByteArray getExpandedPskKey(quint16 index); - - static QByteArray sha256(const QByteArray &message); - -private: - EC_KEY *_key; - QByteArray _pubKey; - quint32 _id; - - QString _serverName; - QString _clientName; - - QByteArray _sharedSecret; - - quint16 _clientTmpNum; - QByteArray _clientTmpKey; - quint16 _serverTmpNum; - QByteArray _serverTmpKey; -}; - -#endif // WMSPEER_H |