1
0

Removed OS dependencies from CryptoPP; Removed unused modules that didn't compile on some platforms

git-svn-id: http://mc-server.googlecode.com/svn/trunk@827 0a769ca7-a7f5-676a-18bf-c427514a06d6
This commit is contained in:
madmaxoft@gmail.com
2012-09-04 10:17:27 +00:00
parent 532ed91a72
commit 49f6828834
8 changed files with 12 additions and 864 deletions

View File

@@ -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;