openssl/ssl
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
..
record Various review fixes for PSK early_data support 2017-08-31 15:03:35 +01:00
statem Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
bio_ssl.c Get pointer type right in BIO_ssl_shutdown() 2017-03-07 09:56:49 -05:00
build.info Move ssl/t1_ext.c to ssl/statem/extensions_cust.c 2017-04-07 13:41:04 +01:00
d1_lib.c add callback handler for setting DTLS timer interval 2017-09-06 08:30:00 +02:00
d1_msg.c (Re)move some things from e_os.h 2017-08-22 14:15:40 -04:00
d1_srtp.c Move client parsing of ServerHello extensions into new framework 2016-12-08 17:18:25 +00:00
methods.c Drop support for OPENSSL_NO_TLS1_3_METHOD 2017-06-30 09:41:46 +01:00
packet_locl.h TLS1.3 Padding 2017-05-02 09:44:43 +01:00
packet.c Move ossl_assert 2017-08-03 10:48:00 +01:00
pqueue.c Update copyright header 2017-07-30 17:42:00 -04:00
s3_cbc.c Move ossl_assert 2017-08-03 10:48:00 +01:00
s3_enc.c Move ossl_assert 2017-08-03 10:48:00 +01:00
s3_lib.c New function ssl_generate_param_group 2017-09-26 13:00:26 +01:00
s3_msg.c (Re)move some things from e_os.h 2017-08-22 14:15:40 -04:00
ssl_asn1.c Send and receive the ticket_nonce field in a NewSessionTicket 2017-07-07 15:02:09 +01:00
ssl_cert_table.h Add RSA-PSS key certificate type. 2017-09-20 12:50:23 +01:00
ssl_cert.c Remove unnecessary #include <openssl/lhash.h> directives. 2017-09-29 07:38:56 +10:00
ssl_ciph.c Add ARIA as an alias for all ARIA based modes. 2017-08-31 08:40:11 +10:00
ssl_conf.c e_os.h removal from other headers and source files. 2017-08-30 07:20:43 +10:00
ssl_err.c Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
ssl_init.c Implement Aria GCM/CCM Modes and TLS cipher suites 2017-08-30 12:33:53 +02:00
ssl_lib.c Remove unnecessary #include <openssl/lhash.h> directives. 2017-09-29 07:38:56 +10:00
ssl_locl.h Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
ssl_mcnf.c Fix misc size_t issues causing Windows warnings in 64 bit 2016-11-04 12:09:46 +00:00
ssl_rsa.c Use certificate tables instead of ssl_cert_type 2017-07-13 12:38:42 +01:00
ssl_sess.c Session resume broken switching contexts 2017-10-04 10:21:08 +10:00
ssl_stat.c Fix errors in SSL_state_string_long 2017-07-31 08:55:37 -04:00
ssl_txt.c Merge Nokia copyright notice into standard 2017-06-21 08:59:18 -04:00
ssl_utst.c Remove heartbeat support 2016-11-13 16:24:02 -05:00
t1_enc.c Fix tls1_generate_master_secret 2017-06-22 11:54:19 -04:00
t1_lib.c Add and use function tls1_in_list to avoid code duplication. 2017-09-26 13:00:26 +01:00
t1_trce.c SSL Trace improvements 2017-09-10 23:33:37 -04:00
tls13_enc.c Make sure we use the correct cipher when using the early_secret 2017-08-31 15:02:58 +01:00
tls_srp.c Add a DRBG to each SSL object 2017-08-03 10:24:03 -04:00