-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initial server-side session ticket support #35
Conversation
Unless `SSL_OP_NO_TICKET` has been set in the `raw_options` we should configure a ticketer in the `ServerConfig` constructed by `Ssl::init_server_conn`. The nginx test server configurations are updated to all disable session tickets. For the no resumption case, this is what we want explicitly. For the existing resumption tests this is necessary to test the stateful session resumption. A new configuration that enables session tickets is added to test that resumption method. The `nginx` runner test is updated to test this new configuration works as expected w/ a `curl` client.
Some simple coverage is added to `server.c`
I thought I might be able to add a |
This appears to be the case. I was only setting |
The `SSL_CTX_set_tlsext_ticket_key_cb` and `SSL_CTX_set_tlsext_ticket_key_evp_cb` API functions can be used to set up callbacks for managing TLS session tickets. Implementing this properly will be challenging as they take `EVP_CIPHER_CTX` and `EVP_MAC_CTX` arguments and expect the caller to do a lot of the heavy-lifting. For now let's stub it and see how far we can get by just opaquely handling TLS session tickets internal to Rustls w/ our own ticketer.
I think this is ready for review now. |
This branch starts to sketch out initial server-side support for TLS session tickets. We take the easy route for now and manage this opaquely internal to Rustls using the aws-lc-rs implementation of an AEAD ticketer/ticket switcher.
We offer the ability for OpenSSL API users to disable ticket support (either with
SSL_set_options()
andSSL_OP_NO_TICKET
, or withSSL_CONF_cmd
using-no_tickets
orOptions -SessionTicket
) and to control the number of session tickets (defaulting to 2 to match OpenSSL default, customizable withSSL_CTX_set_num_tickets
/SSL_set_num_tickets
).We don't offer more fine grain control over generating/encrypting/decrypting tickets and instead stub
SSL_CTX_set_tlsext_ticket_key_cb
andSSL_CTX_set_tlsext_ticket_key_evp_cb
.Resolves #30