diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2017-09-21 09:41:37 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2018-02-19 15:29:34 +0100 |
commit | a6ef6b66b30f2fda92cb9e8daac4818527c740a9 (patch) | |
tree | f4906bd0a81176aa69e98db210c93d48fc25ff34 /lib/state.h | |
parent | bc5380141d584b48095d5662d8bb9c271f9e1a15 (diff) | |
download | gnutls-a6ef6b66b30f2fda92cb9e8daac4818527c740a9.tar.gz |
handshake: properly set the default record version
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/state.h')
-rw-r--r-- | lib/state.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/state.h b/lib/state.h index 712b5d747f..266af94e5c 100644 --- a/lib/state.h +++ b/lib/state.h @@ -42,6 +42,17 @@ _gnutls_session_group_set(gnutls_session_t session, session->security_parameters.grp = e; } +inline static +void set_default_version(gnutls_session_t session, const version_entry_st *ver) +{ + if (ver->tls13_sem) { + session->internals.default_record_version[0] = 3; + session->internals.default_record_version[1] = 1; + } else { + session->internals.default_record_version[0] = ver->major; + session->internals.default_record_version[1] = ver->minor; + } +} void _gnutls_record_set_default_version(gnutls_session_t session, |