]> git.kaiwu.me - nginx.git/commit
SSL: optimized rotation of session ticket keys.
authorMaxim Dounin <mdounin@mdounin.ru>
Wed, 12 Oct 2022 17:14:55 +0000 (20:14 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Wed, 12 Oct 2022 17:14:55 +0000 (20:14 +0300)
commit02314f0c3c70bad88ae3554eb66439a261898f24
tree9a901e57200675ed07b3d6f668cfa6b2fae689a2
parent1d572e359a210dcb27e5e073c016c1768c435263
SSL: optimized rotation of session ticket keys.

Instead of syncing keys with shared memory on each ticket operation,
the code now does this only when the worker is going to change expiration
of the current key, or going to switch to a new key: that is, usually
at most once per second.

To do so without races, the code maintains 3 keys: current, previous,
and next.  If a worker will switch to the next key earlier, other workers
will still be able to decrypt new tickets, since they will be encrypted
with the next key.
src/event/ngx_event_openssl.c
src/event/ngx_event_openssl.h