summaryrefslogtreecommitdiffstats
path: root/source/cServer.h
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-30 23:06:13 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-30 23:06:13 +0200
commit539364846a89987ac2679988653f50332cb91d26 (patch)
treef1695473c1f493a19c5fbdb70f7f1faccf99d7f3 /source/cServer.h
parentUpdated to V6 - "Stop" and "Progress report" functionality (diff)
downloadcuberite-539364846a89987ac2679988653f50332cb91d26.tar
cuberite-539364846a89987ac2679988653f50332cb91d26.tar.gz
cuberite-539364846a89987ac2679988653f50332cb91d26.tar.bz2
cuberite-539364846a89987ac2679988653f50332cb91d26.tar.lz
cuberite-539364846a89987ac2679988653f50332cb91d26.tar.xz
cuberite-539364846a89987ac2679988653f50332cb91d26.tar.zst
cuberite-539364846a89987ac2679988653f50332cb91d26.zip
Diffstat (limited to 'source/cServer.h')
-rw-r--r--source/cServer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/cServer.h b/source/cServer.h
index a97bcbd7a..7baaa0d6a 100644
--- a/source/cServer.h
+++ b/source/cServer.h
@@ -12,6 +12,8 @@
#define CSERVER_H_INCLUDED
#include "cSocketThreads.h"
+#include "CryptoPP/rsa.h"
+#include "CryptoPP/osrng.h"
@@ -66,6 +68,9 @@ public: //tolua_export
void RemoveClient(const cSocket * a_Socket); // Removes the socket from m_SocketThreads
+ CryptoPP::RSA::PrivateKey & GetPrivateKey(void) { return m_PrivateKey; }
+ CryptoPP::RSA::PublicKey & GetPublicKey (void) { return m_PublicKey; }
+
private:
friend class cRoot; // so cRoot can create and destroy cServer
@@ -114,10 +119,15 @@ private:
int m_iServerPort;
bool m_bRestarting;
+
+ CryptoPP::RSA::PrivateKey m_PrivateKey;
+ CryptoPP::RSA::PublicKey m_PublicKey;
cServer();
~cServer();
+ /// Loads, or generates, if missing, RSA keys for protocol encryption
+ void PrepareKeys(void);
}; //tolua_export