stun: Use libgcrypt to provide secure random number generation
authorPhilip Withnall <philip@tecnocode.co.uk>
Mon, 7 Mar 2016 09:27:38 +0000 (09:27 +0000)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Fri, 31 Mar 2017 22:26:09 +0000 (18:26 -0400)
commitd2f894e48c70f11f01ddf3dd8be3d68dfd48aea8
treefcba880cd90a848b0aef3841648291a28136fec9
parentd81c0d5f535e7c335f7c7f57359a1863fbdd867e
stun: Use libgcrypt to provide secure random number generation

Previously, a custom Mersenne Twister PRNG was used, which is not
securely random. In addition, its seeding fell back to wall-clock time,
which is typically predictable.

This uses libgcrypt on Linux but retains the Windows code which uses the
Windows crypt API.

Differential Revision: https://phabricator.freedesktop.org/D1610
stun/rand.c