summaryrefslogtreecommitdiffstats
path: root/Tools/ProtoProxy/Server.cpp
diff options
context:
space:
mode:
authordaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
committerdaniel0916 <theschokolps@gmail.com>2014-04-07 20:12:17 +0200
commit2e9754ac1cf0537c12ab7974cf55c451c0724540 (patch)
tree713c5b8c8f22f77893b30b9c8cefca4a7c491483 /Tools/ProtoProxy/Server.cpp
parentFixed merge conflict (diff)
parentFixed some more minor issues with the redstone simulator. (diff)
downloadcuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.gz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.bz2
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.lz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.xz
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.tar.zst
cuberite-2e9754ac1cf0537c12ab7974cf55c451c0724540.zip
Diffstat (limited to 'Tools/ProtoProxy/Server.cpp')
-rw-r--r--Tools/ProtoProxy/Server.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/Tools/ProtoProxy/Server.cpp b/Tools/ProtoProxy/Server.cpp
index 71b5ecb94..bb042b259 100644
--- a/Tools/ProtoProxy/Server.cpp
+++ b/Tools/ProtoProxy/Server.cpp
@@ -34,12 +34,8 @@ int cServer::Init(short a_ListenPort, short a_ConnectPort)
#endif // _WIN32
printf("Generating protocol encryption keypair...\n");
- time_t CurTime = time(NULL);
- RandomPool rng;
- rng.Put((const byte *)&CurTime, sizeof(CurTime));
- m_PrivateKey.GenerateRandomWithKeySize(rng, 1024);
- RSA::PublicKey pk(m_PrivateKey);
- m_PublicKey = pk;
+ m_PrivateKey.Generate();
+ m_PublicKeyDER = m_PrivateKey.GetPubKeyDER();
m_ListenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
sockaddr_in local;