From fd9cc393ba5fba46c2d98c2cb8470863039e75e2 Mon Sep 17 00:00:00 2001 From: Nikos Mavrogiannopoulos Date: Mon, 26 Jun 2017 10:02:22 +0200 Subject: 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 --- lib/ext/etm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/ext/etm.c') 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; -- cgit v1.2.1