summaryrefslogtreecommitdiffstats
path: root/source/Protocol132.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-06 19:36:59 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-09-06 19:36:59 +0200
commit0ba2be666f68dda7a76d28e7cd8c74812c501d9f (patch)
treebf0795f7b89dd956bf4a4cfa002f7ef009915c38 /source/Protocol132.h
parentRemoved excessive debug logging in cProtocol132 (diff)
downloadcuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar.gz
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar.bz2
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar.lz
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar.xz
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.tar.zst
cuberite-0ba2be666f68dda7a76d28e7cd8c74812c501d9f.zip
Diffstat (limited to 'source/Protocol132.h')
-rw-r--r--source/Protocol132.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/source/Protocol132.h b/source/Protocol132.h
index 3117af777..cca91c44b 100644
--- a/source/Protocol132.h
+++ b/source/Protocol132.h
@@ -40,6 +40,8 @@ public:
virtual void SendPlayerSpawn (const cPlayer & a_Player) override;
virtual void SendSpawnMob (const cMonster & a_Mob) override;
virtual void SendUnloadChunk (int a_ChunkX, int a_ChunkZ) override;
+
+ virtual AString GetAuthServerID(void) override;
// DEBUG:
virtual void SendKeepAlive (int a_PingID) override;
@@ -64,6 +66,12 @@ protected:
CryptoPP::CFB_Mode<CryptoPP::AES>::Encryption m_Encryptor;
AString m_DataToSend;
+ /// The ServerID used for session authentication; set in StartEncryption(), used in GetAuthServerID()
+ AString m_AuthServerID;
+
+ /// The server's public key, as used by SendEncryptionKeyRequest() and StartEncryption()
+ AString m_ServerPublicKey;
+
virtual void SendData(const char * a_Data, int a_Size) override;
// DEBUG:
@@ -74,12 +82,12 @@ protected:
virtual int ParseItem(cItem & a_Item) override;
virtual void SendCompass(const cWorld & a_World);
- virtual void SendEncryptionKeyRequest(const AString & a_Key);
+ virtual void SendEncryptionKeyRequest(void);
/// Decrypts the key and nonce, checks nonce, starts the symmetric encryption
void HandleEncryptionKeyResponse(const AString & a_EncKey, const AString & a_EncNonce);
- /// Starts the symmetric encryption with the specified key
+ /// Starts the symmetric encryption with the specified key; also sets m_AuthServerID
void StartEncryption(const byte * a_Key);
} ;