Todd Short a84e5c9aa8 Session resume broken switching contexts
When an SSL's context is swtiched from a ticket-enabled context to
a ticket-disabled context in the servername callback, no session-id
is generated, so the session can't be resumed.

If a servername callback changes the SSL_OP_NO_TICKET option, check
to see if it's changed to disable, and whether a session ticket is
expected (i.e. the client indicated ticket support and the SSL had
tickets enabled at the time), and whether we already have a previous
session (i.e. s->hit is set).

In this case, clear the ticket-expected flag, remove any ticket data
and generate a session-id in the session.

If the SSL hit (resumed) and switched to a ticket-disabled context,
assume that the resumption was via session-id, and don't bother to
update the session.

Before this fix, the updated unit-tests in 06-sni-ticket.conf would
fail test #4 (server1 = SNI, server2 = no SNI).

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/1529)
2017-10-04 10:21:08 +10:00
..
2017-08-22 14:15:40 -04:00
2017-05-02 09:44:43 +01:00
2017-08-03 10:48:00 +01:00
2017-07-30 17:42:00 -04:00
2017-08-03 10:48:00 +01:00
2017-08-03 10:48:00 +01:00
2017-09-26 13:00:26 +01:00
2017-08-22 14:15:40 -04:00
2017-07-31 08:55:37 -04:00
2016-11-13 16:24:02 -05:00
2017-06-22 11:54:19 -04:00
2017-09-10 23:33:37 -04:00
2017-08-03 10:24:03 -04:00