summaryrefslogtreecommitdiffstats
path: root/src/Server.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/Server.h')
-rw-r--r--src/Server.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/src/Server.h b/src/Server.h
index 703a7077e..15eafc00a 100644
--- a/src/Server.h
+++ b/src/Server.h
@@ -23,8 +23,7 @@
#pragma warning(disable:4702)
#endif
-#include "cryptopp/rsa.h"
-#include "cryptopp/randpool.h"
+#include "Crypto.h"
#ifdef _MSC_VER
#pragma warning(pop)
@@ -88,14 +87,14 @@ public: // tolua_export
const AString & GetServerID(void) const { return m_ServerID; } // tolua_export
- void ClientDestroying(const cClientHandle * a_Client); // Called by cClientHandle::Destroy(); stop m_SocketThreads from calling back into a_Client
+ /** Called by cClientHandle's destructor; stop m_SocketThreads from calling back into a_Client */
+ void ClientDestroying(const cClientHandle * a_Client);
- void NotifyClientWrite(const cClientHandle * a_Client); // Notifies m_SocketThreads that client has something to be written
+ /** Notifies m_SocketThreads that client has something to be written */
+ void NotifyClientWrite(const cClientHandle * a_Client);
void WriteToClient(const cClientHandle * a_Client, const AString & a_Data); // Queues outgoing data for the client through m_SocketThreads
- void QueueClientClose(const cClientHandle * a_Client); // Queues the clienthandle to close when all its outgoing data is sent
-
void RemoveClient(const cClientHandle * a_Client); // Removes the clienthandle from m_SocketThreads
/// Don't tick a_Client anymore, it will be ticked from its cPlayer instead
@@ -110,8 +109,8 @@ public: // tolua_export
/** Returns base64 encoded favicon data (obtained from favicon.png) */
const AString & GetFaviconData(void) const { return m_FaviconData; }
- CryptoPP::RSA::PrivateKey & GetPrivateKey(void) { return m_PrivateKey; }
- CryptoPP::RSA::PublicKey & GetPublicKey (void) { return m_PublicKey; }
+ cRSAPrivateKey & GetPrivateKey(void) { return m_PrivateKey; }
+ const AString & GetPublicKeyDER(void) const { return m_PublicKeyDER; }
private:
@@ -180,8 +179,11 @@ private:
bool m_bRestarting;
- CryptoPP::RSA::PrivateKey m_PrivateKey;
- CryptoPP::RSA::PublicKey m_PublicKey;
+ /** The private key used for the assymetric encryption start in the protocols */
+ cRSAPrivateKey m_PrivateKey;
+
+ /** Public key for m_PrivateKey, ASN1-DER-encoded */
+ AString m_PublicKeyDER;
cRCONServer m_RCONServer;