diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-05-01 15:16:37 +0300 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2013-05-01 15:16:37 +0300 |
commit | becc9ae4129544af1d0fe292fcbde29cfede74dd (patch) | |
tree | 1e0d9d22dc39370ed4f5f6acee2c506c57e7756e /lib/gnutls_handshake.c | |
parent | 09cf6a9ff71b19f20cd710abc65ba8552d593f7a (diff) | |
download | gnutls-becc9ae4129544af1d0fe292fcbde29cfede74dd.tar.gz |
simplified code
Diffstat (limited to 'lib/gnutls_handshake.c')
-rw-r--r-- | lib/gnutls_handshake.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index cf1e06cc67..4c96acfeab 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -728,6 +728,7 @@ _gnutls_recv_finished (gnutls_session_t session) int data_size; int ret; int vrfy_size; + int version = gnutls_protocol_get_version (session); ret = _gnutls_recv_handshake (session, GNUTLS_HANDSHAKE_FINISHED, @@ -742,14 +743,10 @@ _gnutls_recv_finished (gnutls_session_t session) vrfy = buf.data; vrfy_size = buf.length; - if (gnutls_protocol_get_version (session) == GNUTLS_SSL3) - { - data_size = 36; - } + if (version == GNUTLS_SSL3) + data_size = 36; else - { - data_size = 12; - } + data_size = 12; if (vrfy_size != data_size) { @@ -758,7 +755,7 @@ _gnutls_recv_finished (gnutls_session_t session) goto cleanup; } - if (gnutls_protocol_get_version (session) == GNUTLS_SSL3) + if (version == GNUTLS_SSL3) { ret = _gnutls_ssl3_finished (session, |