From 8f1890e877467bd458910e4b7e5d8dcaceb25854 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Sat, 25 Jan 2014 19:19:37 +0100 Subject: ProtoProxy: Modified to use PolarSSL. --- Tools/ProtoProxy/Connection.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Tools/ProtoProxy/Connection.h') diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index abb8b6cd0..5e4f8cd7b 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -62,14 +62,12 @@ public: void LogFlush(void); protected: - typedef CFB_Mode::Encryption Encryptor; - typedef CFB_Mode::Decryption Decryptor; - + cByteBuffer m_ClientBuffer; cByteBuffer m_ServerBuffer; - Decryptor m_ServerDecryptor; - Encryptor m_ServerEncryptor; + cAESCFBDecryptor m_ServerDecryptor; + cAESCFBEncryptor m_ServerEncryptor; AString m_ServerEncryptionBuffer; // Buffer for the data to be sent to the server once encryption is established @@ -111,10 +109,10 @@ protected: bool SendData(SOCKET a_Socket, cByteBuffer & a_Data, const char * a_Peer); /// Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false - bool SendEncryptedData(SOCKET a_Socket, Encryptor & a_Encryptor, const char * a_Data, int a_Size, const char * a_Peer); + bool SendEncryptedData(SOCKET a_Socket, cAESCFBEncryptor & a_Encryptor, const char * a_Data, int a_Size, const char * a_Peer); /// Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false - bool SendEncryptedData(SOCKET a_Socket, Encryptor & a_Encryptor, cByteBuffer & a_Data, const char * a_Peer); + bool SendEncryptedData(SOCKET a_Socket, cAESCFBEncryptor & a_Encryptor, cByteBuffer & a_Data, const char * a_Peer); /// Decodes packets coming from the client, sends appropriate counterparts to the server; returns false if the connection is to be dropped bool DecodeClientsPackets(const char * a_Data, int a_Size); -- cgit v1.2.3 From bc556e7f00ee28198b5ba3e46c1c06caab8fc37b Mon Sep 17 00:00:00 2001 From: Tycho Date: Mon, 10 Mar 2014 12:21:18 -0700 Subject: Fixed Issues in ProtoProxy --- Tools/ProtoProxy/Connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tools/ProtoProxy/Connection.h') diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index 5e4f8cd7b..70b759d0f 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -109,7 +109,7 @@ protected: bool SendData(SOCKET a_Socket, cByteBuffer & a_Data, const char * a_Peer); /// Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false - bool SendEncryptedData(SOCKET a_Socket, cAESCFBEncryptor & a_Encryptor, const char * a_Data, int a_Size, const char * a_Peer); + bool SendEncryptedData(SOCKET a_Socket, cAESCFBEncryptor & a_Encryptor, const char * a_Data, size_t a_Size, const char * a_Peer); /// Sends data to the specfied socket, after encrypting it using a_Encryptor. If sending fails, prints a fail message using a_Peer and returns false bool SendEncryptedData(SOCKET a_Socket, cAESCFBEncryptor & a_Encryptor, cByteBuffer & a_Data, const char * a_Peer); -- cgit v1.2.3 From 446a6515029e66b1f76358dcee1ccfe59c432bdd Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Fri, 4 Apr 2014 08:55:48 +0200 Subject: ProtoProxy: Fixed a few Clang and MSVC warnings. --- Tools/ProtoProxy/Connection.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Tools/ProtoProxy/Connection.h') diff --git a/Tools/ProtoProxy/Connection.h b/Tools/ProtoProxy/Connection.h index 70b759d0f..9e04994b7 100644 --- a/Tools/ProtoProxy/Connection.h +++ b/Tools/ProtoProxy/Connection.h @@ -103,7 +103,7 @@ protected: double GetRelativeTime(void); /// Sends data to the specified socket. If sending fails, prints a fail message using a_Peer and returns false. - bool SendData(SOCKET a_Socket, const char * a_Data, int a_Size, const char * a_Peer); + bool SendData(SOCKET a_Socket, const char * a_Data, size_t a_Size, const char * a_Peer); /// Sends data to the specified socket. If sending fails, prints a fail message using a_Peer and returns false. bool SendData(SOCKET a_Socket, cByteBuffer & a_Data, const char * a_Peer); -- cgit v1.2.3