Check RAND_bytes() return value, fail when getting random fails.
authorSteffan Karger <steffan@karger.me>
Tue, 29 Apr 2014 20:03:43 +0000 (22:03 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Thu, 1 May 2014 12:56:07 +0000 (14:56 +0200)
commit6685f2c8afc4775c3656dccc5a37286c01c0e854
tree8bdb088bd464cfd37fec7ac2a8f869b777e3e86a
parent8794274a30d535d49636fec825a0afbf30d8010d
Check RAND_bytes() return value, fail when getting random fails.

When RAND_bytes() does not return success, the buffer contents cannot be
used. This patch makes sure the return code is checked, and the connection
fails when keys or challenges cannot be trusted.

Signed-off-by: Steffan Karger <steffan@karger.me>
src/protocol_auth.c
src/protocol_key.c