diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-03-11 22:33:29 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2010-03-11 22:33:29 +0100 |
commit | 4f31d28f160a59fcf0e7db50ffc678e67d561324 (patch) | |
tree | db7199c50f977cd526a2fd801c2c2eac83ef4c36 /lib/gnutls_extensions.c | |
parent | fe2189bf85e8a5d494cd3ee63280aeeedd5503e5 (diff) | |
download | gnutls-4f31d28f160a59fcf0e7db50ffc678e67d561324.tar.gz |
Extension generation in SSL 3.0 (as a reply to SCSV) is not using
common code with normal extension generation. Solve issue reported by
Tomas Mraz that caused SSL 3.0 renegotiation fail.
Diffstat (limited to 'lib/gnutls_extensions.c')
-rw-r--r-- | lib/gnutls_extensions.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c index f330144ae5..e27c7761b9 100644 --- a/lib/gnutls_extensions.c +++ b/lib/gnutls_extensions.c @@ -210,7 +210,7 @@ _gnutls_extension_list_add (gnutls_session_t session, uint16_t type) int _gnutls_gen_extensions (gnutls_session_t session, opaque * data, - size_t data_size) + size_t data_size, gnutls_ext_parse_type_t parse_type) { int size; uint16_t pos = 0; @@ -241,6 +241,9 @@ _gnutls_gen_extensions (gnutls_session_t session, opaque * data, if (p->send_func == NULL) continue; + + if (parse_type != GNUTLS_EXT_ANY && p->parse_type != parse_type) + continue; size = p->send_func (session, sdata, sdata_size); if (size > 0 || size == GNUTLS_E_INT_RET_0) @@ -327,7 +330,7 @@ _gnutls_ext_init (void) ret = gnutls_ext_register (GNUTLS_EXTENSION_SAFE_RENEGOTIATION, "SAFE_RENEGOTIATION", - GNUTLS_EXT_RESUMED, + GNUTLS_EXT_MANDATORY, _gnutls_safe_renegotiation_recv_params, _gnutls_safe_renegotiation_send_params); if (ret != GNUTLS_E_SUCCESS) |