diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-06-19 11:57:22 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:33 +0100 |
commit | 23e48151eba05142b15ddd2cea6fa42fbc626abf (patch) | |
tree | 623ecda24aa64ddb148037dff70456cf2b016d29 /lib/sslv2_compat.c | |
parent | 962ef882031062866f6782078af17cf9701266da (diff) | |
download | gnutls-23e48151eba05142b15ddd2cea6fa42fbc626abf.tar.gz |
Added TLS 1.3 Hello message random generation
That is, added check for TLS 1.3 random value requirements in client side,
and generation according to TLS 1.3 requirements for server and
client side.
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/sslv2_compat.c')
-rw-r--r-- | lib/sslv2_compat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sslv2_compat.c b/lib/sslv2_compat.c index 2887550255..c66ad77439 100644 --- a/lib/sslv2_compat.c +++ b/lib/sslv2_compat.c @@ -96,6 +96,7 @@ _gnutls_read_client_hello_v2(gnutls_session_t session, uint8_t * data, gnutls_protocol_t adv_version; uint8_t rnd[GNUTLS_RANDOM_SIZE], major, minor; int len = datalen; + int neg_version; uint16_t challenge; uint8_t session_id[GNUTLS_MAX_SESSION_ID_SIZE]; @@ -116,6 +117,7 @@ _gnutls_read_client_hello_v2(gnutls_session_t session, uint8_t * data, gnutls_assert(); return ret; } + neg_version = ret; pos += 2; @@ -211,7 +213,7 @@ _gnutls_read_client_hello_v2(gnutls_session_t session, uint8_t * data, return gnutls_assert_val(ret); /* generate server random value */ - ret = _gnutls_set_server_random(session, NULL); + ret = _gnutls_set_server_random(session, neg_version, NULL); if (ret < 0) return gnutls_assert_val(ret); |