diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-08-19 13:39:28 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2017-08-19 13:39:28 +0200 |
commit | fc9e1d427c745b9fc9445bf51b7299ce7477b221 (patch) | |
tree | af585b6523d47d93cc83a7b7b1bf2c10540ee098 /lib | |
parent | 29d6514027b25a7690ed5f384a696ce7b3068910 (diff) | |
download | gnutls-fc9e1d427c745b9fc9445bf51b7299ce7477b221.tar.gz |
create_tls_random: avoid warning in fuzzying mode
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/handshake.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/handshake.c b/lib/handshake.c index e9b6876b71..9a38cf8242 100644 --- a/lib/handshake.c +++ b/lib/handshake.c @@ -172,10 +172,9 @@ static int resume_copy_required_values(gnutls_session_t session) */ static int create_tls_random(uint8_t * dst) { - uint32_t tim; int ret; - /* Use weak random numbers for the most of the + /* Use nonce rng level for the most of the * buffer except for the first 4 that are the * system's time. */ @@ -184,6 +183,8 @@ static int create_tls_random(uint8_t * dst) /* When fuzzying avoid timing dependencies */ memset(dst, 1, 4); #else + uint32_t tim; + tim = gnutls_time(NULL); /* generate server random value */ _gnutls_write_uint32(tim, dst); |