[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-384-gf7fb78b
From: |
Nikos Mavrogiannopoulos |
Subject: |
[SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-384-gf7fb78b |
Date: |
Wed, 29 Sep 2010 09:10:26 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".
http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=f7fb78be8ff377b42c2159c0464149d4d53888f1
The branch, master has been updated
via f7fb78be8ff377b42c2159c0464149d4d53888f1 (commit)
via 37610c48d7e7518ebc28761c2e4366280865ee2e (commit)
via 0a42348eaae840bcee74a87cbef04f3ae21ee480 (commit)
via eeecd30139aea39ffc609aa4e5264ed4df3d60a6 (commit)
from 96b97d92e4f6075a42c2d35dd4413b085b58a462 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit f7fb78be8ff377b42c2159c0464149d4d53888f1
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Wed Sep 29 11:09:30 2010 +0200
treat absence of parameters the same as having them disabled.
commit 37610c48d7e7518ebc28761c2e4366280865ee2e
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Wed Sep 29 11:09:05 2010 +0200
Corrected behavior on failure (don't crash).
commit 0a42348eaae840bcee74a87cbef04f3ae21ee480
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Wed Sep 29 10:45:12 2010 +0200
Corrected bugs when restoring extensions during session resumtion.
commit eeecd30139aea39ffc609aa4e5264ed4df3d60a6
Author: Nikos Mavrogiannopoulos <address@hidden>
Date: Wed Sep 29 10:05:11 2010 +0200
Use more informative logging for extensions.
-----------------------------------------------------------------------
Summary of changes:
lib/ext_session_ticket.c | 13 ++++++-------
lib/gnutls_extensions.c | 19 ++++++++++++-------
tests/resume.c | 3 +--
3 files changed, 19 insertions(+), 16 deletions(-)
diff --git a/lib/ext_session_ticket.c b/lib/ext_session_ticket.c
index b450539..2e1abfb 100644
--- a/lib/ext_session_ticket.c
+++ b/lib/ext_session_ticket.c
@@ -273,8 +273,7 @@ session_ticket_recv_params (gnutls_session_t session,
ret = _gnutls_ext_get_session_data( session,
GNUTLS_EXTENSION_SESSION_TICKET, &epriv);
if (ret < 0)
{
- gnutls_assert();
- return ret;
+ return 0;
}
priv = epriv.ptr;
@@ -382,7 +381,7 @@ session_ticket_send_params (gnutls_session_t session,
ret = _gnutls_ext_get_resumed_session_data( session,
GNUTLS_EXTENSION_SESSION_TICKET, &epriv);
if (ret >= 0)
priv = epriv.ptr;
-
+
/* no previous data. Just advertize it */
if (ret < 0)
return GNUTLS_E_INT_RET_0;
@@ -417,6 +416,7 @@ session_ticket_ext_st* priv = epriv.ptr;
int ret;
BUFFER_APPEND_PFX(ps, priv->session_ticket, priv->session_ticket_len);
+ BUFFER_APPEND_NUM(ps, priv->session_ticket_enable);
return 0;
}
@@ -438,11 +438,12 @@ gnutls_datum ticket;
BUFFER_POP_DATUM(ps, &ticket);
priv->session_ticket = ticket.data;
priv->session_ticket_len = ticket.size;
+ BUFFER_POP_NUM(ps, priv->session_ticket_enable);
epriv.ptr = priv;
*_priv = epriv;
- ret = 0;
+ return 0;
error:
gnutls_free(priv);
@@ -603,7 +604,7 @@ _gnutls_send_new_session_ticket (gnutls_session_t session,
int again)
if (!priv->session_ticket_renew)
return 0;
-
+
/* XXX: Temporarily set write algorithms to be used.
_gnutls_write_connection_state_init() does this job, but it also
triggers encryption, while NewSessionTicket should not be
@@ -663,7 +664,6 @@ _gnutls_send_new_session_ticket (gnutls_session_t session,
int again)
data_size = p - data;
}
-
ret = _gnutls_send_handshake (session, data_size ? bufel : NULL,
GNUTLS_HANDSHAKE_NEW_SESSION_TICKET);
@@ -728,7 +728,6 @@ _gnutls_recv_new_session_ticket (gnutls_session_t session)
if (ret < 0)
{
gnutls_assert ();
- gnutls_free (data);
gnutls_free (priv->session_ticket);
priv->session_ticket = NULL;
return GNUTLS_E_INTERNAL_ERROR;
diff --git a/lib/gnutls_extensions.c b/lib/gnutls_extensions.c
index 94196e6..cfa5a03 100644
--- a/lib/gnutls_extensions.c
+++ b/lib/gnutls_extensions.c
@@ -171,8 +171,10 @@ _gnutls_parse_extensions (gnutls_session_t session,
type = _gnutls_read_uint16 (&data[pos]);
pos += 2;
+#if 0
_gnutls_debug_log ("EXT[%p]: Found extension '%s/%d'\n", session,
_gnutls_extension_get_name (type), type);
+#endif
if ((ret = _gnutls_extension_list_check (session, type)) < 0)
{
@@ -192,6 +194,8 @@ _gnutls_parse_extensions (gnutls_session_t session,
if (ext_recv == NULL)
continue;
+ _gnutls_debug_log ("EXT[%p]: Parsing extension '%s/%d' (%d bytes)\n",
session,
+ _gnutls_extension_get_name (type), type, size);
if ((ret = ext_recv (session, sdata, size)) < 0)
{
@@ -430,11 +434,10 @@ int i, ret;
extension_priv_data_t data;
int cur_size;
int size_offset;
-void* total_exts_pos;
+int total_exts_pos;
int exts = 0;
- total_exts_pos = packed->data + packed->length;
-
+ total_exts_pos = packed->length;
BUFFER_APPEND_NUM(packed, 0);
for (i = 0; i < extfunc_size; i++)
@@ -462,7 +465,7 @@ int exts = 0;
}
}
- _gnutls_write_uint32(exts, total_exts_pos);
+ _gnutls_write_uint32(exts, packed->data+total_exts_pos);
return 0;
@@ -505,7 +508,7 @@ int i;
for (i=0;i<MAX_EXT_TYPES;i++)
{
- if (session->internals.resumed_extension_int_data[i].type == type)
+ if (session->internals.resumed_extension_int_data[i].type == type ||
session->internals.resumed_extension_int_data[i].set == 0)
{
if (session->internals.resumed_extension_int_data[i].set != 0)
@@ -528,6 +531,7 @@ int max_exts = 0;
uint16_t type;
int size_for_type, cur_pos;
+
BUFFER_POP_NUM(packed, max_exts);
for (i = 0; i < max_exts; i++)
{
@@ -542,14 +546,14 @@ int size_for_type, cur_pos;
gnutls_assert();
return GNUTLS_E_PARSING_ERROR;
}
-
+
ret = unpack(packed, &data);
if (ret < 0)
{
gnutls_assert();
return ret;
}
-
+
/* verify that unpack read the correct bytes */
cur_pos = cur_pos - packed->length;
if (cur_pos /* read length */ != size_for_type)
@@ -557,6 +561,7 @@ int size_for_type, cur_pos;
gnutls_assert();
return GNUTLS_E_PARSING_ERROR;
}
+
_gnutls_ext_set_resumed_session_data(session, type, data);
}
diff --git a/tests/resume.c b/tests/resume.c
index f746d30..488dd8c 100644
--- a/tests/resume.c
+++ b/tests/resume.c
@@ -109,7 +109,6 @@ client (struct params_res *params)
for (t = 0; t < 2; t++)
{ /* connect 2 times to the server */
-
/* connect to the peer
*/
sd = tcp_connect ();
@@ -218,13 +217,13 @@ client (struct params_res *params)
gnutls_bye (session, GNUTLS_SHUT_RDWR);
- end:
tcp_close (sd);
gnutls_deinit (session);
}
+end:
gnutls_anon_free_client_credentials (anoncred);
}
hooks/post-receive
--
GNU gnutls
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU gnutls branch, master, updated. gnutls_2_9_10-384-gf7fb78b,
Nikos Mavrogiannopoulos <=