Re: [PATCH 1/3] tls: Refactor session storage for server mode

Denis Kenzior <[email protected]>
Newsgroups dev.linux.lists.ell
Message-ID <[email protected]>
Hi Andrew,

On 11/7/22 05:30, Andrew Zaborowski wrote:
> In TLS server mode we will need to store multiple session states in the
> session cache instead of only one like on the client.  While the
> l_tls_set_session_cache() method is new use to opportunity to make
> incompatible changes: add the cache size limit parameter and strip "TLS"
> prefix from the setting names in the cache's l_settings object since the
> group name can include this part of the context without duplicating it
> across settings.  Rename the group_name parameter to group_prefix since
> in server mode there will be a settings group per session cached so that
> we can use identical keys for each session.  When removing a session
> remove the whole group rather than individual settings potentially
> leaving an empty group.  Factor out the session loading code common to
> client and server into a function.  When saving a server side session
> state skip the SessionID setting since the session ID is in the group
> name as the primary index.  Add a boolean parameter to
> tls_forget_cached_session() to suppress the update_cb callback if
> needed, to allow the caller to make a single callback after multiple
> changes are made in the session cache instead of calling back after each
> individual change.
> ---
>   ell/tls-private.h |   3 +-
>   ell/tls.c         | 228 ++++++++++++++++++++++++++--------------------
>   ell/tls.h         |   3 +-
>   3 files changed, 133 insertions(+), 101 deletions(-)
> 

All applied, thanks.

Regards,
-Denis
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.