Fixed issue occurred after careless eap::tls_random::time elimination

This commit is contained in:
Simon Rozman 2016-08-13 18:32:40 +02:00
parent f9c6bce0f8
commit 9498e8c9a9

View File

@ -63,7 +63,7 @@ void eap::tls_random::clear()
void eap::tls_random::reset(_In_ HCRYPTPROV cp)
{
_time32((__time32_t*)&time);
_time32((__time32_t*)data);
if (!CryptGenRandom(cp, sizeof(data) - sizeof(__time32_t), data + sizeof(__time32_t)))
throw win_runtime_error(__FUNCTION__ " Error creating randomness.");
}