dnsdist: Protect GnuTLS tickets key rotation with a read-write lock #7256
Otherwise a thread can replace the shared pointer hold by the
Also fixes the type of
Otherwise a thread can replace the shared pointer hold by the GnuTLSIOCtx while another thread is accessing it. The usage count is not incremented since no copy is made, so the content might get deleted while a thread is still accessing it, leading to use-after-free and possibly a crash.
We were trying to retrieve two parameters, ticketsKeysRotationDelay and numberOfTicketsKeys, as strings then convert them to integers, but the Lua wrapper already exposes them as numerical values.