summaryrefslogtreecommitdiff
path: root/lib/ext/etm.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-26 10:02:22 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2017-07-10 07:40:17 +0000
commitfd9cc393ba5fba46c2d98c2cb8470863039e75e2 (patch)
tree9a4283e1ab1a565fb0530425fdaf363341ffe819 /lib/ext/etm.c
parent2ef812203971c17d374ccbb3464397683a2c9477 (diff)
downloadgnutls-fd9cc393ba5fba46c2d98c2cb8470863039e75e2.tar.gz
priorities: share priority structures across sessions
As the contents of the priority cache grows, it makes sense to shared these structures across many sessions (in server side) rather than copying them to a session. All overrides of the priority contents were moved to session->internals. On client side where gnutls_priority_set_direct() is more commonly used, ensure that the set priority is deinitialized. That also introduces gnutls_priority_set2() which does not copy the priority contents by default. Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'lib/ext/etm.c')
-rw-r--r--lib/ext/etm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/ext/etm.c b/lib/ext/etm.c
index 1abb120925..ca6a2f91ce 100644
--- a/lib/ext/etm.c
+++ b/lib/ext/etm.c
@@ -66,7 +66,7 @@ _gnutls_ext_etm_recv_params(gnutls_session_t session,
if (session->security_parameters.entity == GNUTLS_SERVER) {
gnutls_ext_priv_data_t epriv;
- if (session->internals.priorities.no_etm != 0)
+ if (session->internals.no_etm != 0)
return 0;
epriv = (void*)(intptr_t)1;
@@ -99,12 +99,12 @@ static int
_gnutls_ext_etm_send_params(gnutls_session_t session,
gnutls_buffer_st * extdata)
{
- if (session->internals.priorities.no_etm != 0)
+ if (session->internals.no_etm != 0)
return 0;
/* this function sends the client extension data */
if (session->security_parameters.entity == GNUTLS_CLIENT) {
- if (session->internals.priorities.have_cbc != 0)
+ if (session->internals.priorities->have_cbc != 0)
return GNUTLS_E_INT_RET_0;
else
return 0;