tls-session-manager
Safe HaskellNone
LanguageHaskell2010

Network.TLS.SessionTicket

Description

A manager for TLS 1.2/1.3 session ticket.

For TLS 1.3 0-RTT, a ticket is accepted at most once while a replay of its ClientHello could still be fresh.

A dedicated thread is running repeatedly to replece secret keys. So, energy saving is not achieved.

Synopsis

Documentation

newSessionTicketManager :: Config -> IO SessionManager Source #

Creating a session ticket manager.

newSessionTicketManager' :: Config -> IO (SessionManager, IO ()) Source #

data Config Source #

Configuration for session tickets.

defaultConfig :: Config Source #

ticketLifetime: 2 hours (7200 seconds), secretKeyInterval: 30 minutes (1800 seconds)

ticketLifetime :: Config -> Int Source #

Ticket lifetime in seconds. It should match the lifetime the server announces, serverTicketLifetime. As the secret keys are replaced every secretKeyInterval, a ticket is accepted for up to one interval less.

secretKeyInterval :: Config -> Int Source #

The interval to replace the secret key in seconds.