diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-03-19 23:05:26 +0000 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-03-19 23:07:13 +0000 |
commit | 5da712385e07f0965a3f7548933c2bd3c4f254f6 (patch) | |
tree | 9d2db7212e5c8342be2e436174167030ca19ef39 /src/net/tls.c | |
parent | 12002d6955f7423ef02cd6a68946240f6dd592b2 (diff) | |
download | ipxe-5da712385e07f0965a3f7548933c2bd3c4f254f6.tar.gz |
[tls] Include current time within the client random bytes
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/net/tls.c')
-rw-r--r-- | src/net/tls.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/net/tls.c b/src/net/tls.c index 1688dfc38..276b23577 100644 --- a/src/net/tls.c +++ b/src/net/tls.c @@ -28,6 +28,7 @@ FILE_LICENCE ( GPL2_OR_LATER ); #include <stdlib.h> #include <stdarg.h> #include <string.h> +#include <time.h> #include <errno.h> #include <byteswap.h> #include <ipxe/hmac.h> @@ -2030,7 +2031,7 @@ int add_tls ( struct interface *xfer, const char *name, tls_clear_cipher ( tls, &tls->tx_cipherspec_pending ); tls_clear_cipher ( tls, &tls->rx_cipherspec ); tls_clear_cipher ( tls, &tls->rx_cipherspec_pending ); - tls->client_random.gmt_unix_time = 0; + tls->client_random.gmt_unix_time = time ( NULL ); if ( ( rc = tls_generate_random ( tls, &tls->client_random.random, ( sizeof ( tls->client_random.random ) ) ) ) != 0 ) { goto err_random; |