]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: server/ssl: place an rwlock in the per-thread ssl server session
authorWilly Tarreau <w@1wt.eu>
Mon, 21 Aug 2023 06:41:49 +0000 (08:41 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 31 Aug 2023 06:50:01 +0000 (08:50 +0200)
commit607041dec36669f8f9ebc917c2d2d65cb1f8b92a
treeb375297fcacfafe236d277f570cec044e72570c7
parent95ac5fe4a800c882484c930b9d897803c86b7604
MEDIUM: server/ssl: place an rwlock in the per-thread ssl server session

The goal will be to permit a thread to update its session while having
it shared with other threads. For now we only place the lock and arrange
the code around it so that this is quite light. For now only the owner
thread uses this lock so there is no contention.

Note that there is a subtlety in the openssl API regarding
i2s_SSL_SESSION() in that it fills the area pointed to by its argument
with a dump of the session and returns a size that's equal to the
previously allocated one. As such, it does modify the shared area even
if that's not obvious at first glance.
include/haproxy/server-t.h
src/ssl_sock.c