summaryrefslogtreecommitdiffstats
path: root/source/cServer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/cServer.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/cServer.cpp b/source/cServer.cpp
index 157de2388..b294842b7 100644
--- a/source/cServer.cpp
+++ b/source/cServer.cpp
@@ -291,7 +291,10 @@ void cServer::PrepareKeys(void)
// But generating the key takes only a moment, do we even need that?
LOG("Generating protocol encryption keypair...");
- CryptoPP::AutoSeededRandomPool rng;
+
+ time_t CurTime = time(NULL);
+ CryptoPP::RandomPool rng;
+ rng.Put((const byte *)&CurTime, sizeof(CurTime));
m_PrivateKey.GenerateRandomWithKeySize(rng, 1024);
CryptoPP::RSA::PublicKey pk(m_PrivateKey);
m_PublicKey = pk;