From: Nikos Mavrogiannopoulos Date: Sun, 16 May 2010 11:53:03 +0000 (+0200) Subject: Corrected issue on the %SSL3_RECORD_VERSION priority string. It now X-Git-Tag: gnutls_2_11_3~295 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8a9c9c32af04230763435c638d824379db5bf92f;p=thirdparty%2Fgnutls.git Corrected issue on the %SSL3_RECORD_VERSION priority string. It now works even when resuming a session. --- diff --git a/lib/gnutls_handshake.c b/lib/gnutls_handshake.c index d5b8ab18ff..cddeef7f0d 100644 --- a/lib/gnutls_handshake.c +++ b/lib/gnutls_handshake.c @@ -2015,14 +2015,9 @@ _gnutls_send_client_hello (gnutls_session_t session, int again) * (RSA uses it). */ _gnutls_set_adv_version (session, hver); + _gnutls_set_current_version (session, hver); if (session->internals.priorities.ssl3_record_version) - { - /* Honor the SSL3_RECORD_VERSION option - */ - _gnutls_set_current_version (session, GNUTLS_SSL3); - } - else { /* Some old implementations do not interoperate if we send a * different version in the record layer. @@ -2032,7 +2027,7 @@ _gnutls_send_client_hello (gnutls_session_t session, int again) * handshake packet and ignore the one in the packet's record * header. */ - _gnutls_set_current_version (session, hver); + _gnutls_record_set_default_version (session, 3, 0); } /* In order to know when this session was initiated. diff --git a/lib/gnutls_state.c b/lib/gnutls_state.c index daa25c29a1..4dbb815244 100644 --- a/lib/gnutls_state.c +++ b/lib/gnutls_state.c @@ -49,9 +49,6 @@ /* These should really be static, but src/tests.c calls them. Make them public functions? */ void -_gnutls_record_set_default_version (gnutls_session_t session, - unsigned char major, unsigned char minor); -void _gnutls_rsa_pms_set_version (gnutls_session_t session, unsigned char major, unsigned char minor); diff --git a/lib/gnutls_state.h b/lib/gnutls_state.h index 8935c7806a..b600a2ffee 100644 --- a/lib/gnutls_state.h +++ b/lib/gnutls_state.h @@ -30,6 +30,9 @@ void _gnutls_session_cert_type_set (gnutls_session_t session, gnutls_certificate_type_t); +void +_gnutls_record_set_default_version (gnutls_session_t session, + unsigned char major, unsigned char minor); #include